Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode IntelliSense: Wrong import suggestions for CookiesProvider and useCookies #26

Open
mordechaim opened this issue Nov 15, 2024 · 3 comments

Comments

@mordechaim
Copy link

mordechaim commented Nov 15, 2024

I'm working on a reproduction on another issue I'm going to open soon. I wanted to import CookiesProvider, but Intellisense won't suggest the correct import source.

image

@mordechaim
Copy link
Author

Same issue with useCookies()

image

@mordechaim
Copy link
Author

mordechaim commented Nov 17, 2024

The issue I mentioned in the first comment turns out to be related to using path-based cookies, which doesn't work on soft navigations (it only captures the cookies that match the path of the last hard refresh). So while this is not the fault of this library, perhaps we should disable setting the path entirely and always default to '/'

@moshest
Copy link
Owner

moshest commented Nov 20, 2024

Thanks for reporting @mordechaim

We must have different paths for /server and / as some components aren't possible to be imported on client-side components.

Not sure how we can improve this behavior as there is no clear documentation on how to improve IntelliSense suggestions.

@moshest moshest changed the title CookiesProvider not being correctly suggested to import from next-client-cookies/server VSCode IntelliSense: Wrong import suggestions for CookiesProvider and useCookies Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants