-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
React Compiler / React 19 #566
Comments
Thanks for testing the bleeding edge! I wonder if this is due to the .js extension in the import of If you dig into the nuqs files in your node_modules and remove the extension, does it compile successfully? |
I have high hopes that I will not need to learn how to properly memoize components, now … :-D
This is what helped…
The other files |
if any one is still working on this |
An update:
a.
Running the app shows this error in the fronented:
|
An update: I tried again today with the latest packages ( Part 1The build still fails with the error from before:
Part 2I reapplied the hack from #566 (comment) and now the build finishes with the following warning. Same for I can run the app now, and nuqs updates the URL as expected.
|
Thanks for the feedback!
This part is interesting, it looks like there are client imports leaking on the server (where Context isn't available). If |
No, all imports are from |
I added a test case that uses the React Compiler on the v2 branch, and which passed with the latest Next.js canary ( Based on what @tordans and @tylerlaws0n reported, it looks like the behaviour could be app-specific. If y'all could get a minimal page to fail with your respective setups, I could try and add that to the e2e test bench, and find the root cause(s). |
@franky47 I noted this in closing my PR, but to update this thread as well: I built the v2 release locally and the errors I were seeing similar to this thread and the I'll be sure to follow up if I see similar issues after testing v2 more. :) |
I've published a snapshot release of the v2 branch at |
As far as I can tell so far this is working for me! I have come across new issues that are mentioned here: vercel/next.js#66766, so I can't confirm that my build step will work fully until that is resolved, but for now this changeset for nuqs v2 seems great! |
I updated our app to nuqs 2 and the latest packages and it does work now. I still had the issue that I wrote about above, but it turns out that was because something changed and we now cannot import a const into a server code (middleware) from the same file that is also using useQueryState. Once I moved the const to a separate file, the error went away. (This is the commit.) I am now seeing other issues with React 19 but those have nothing to do with nuqs. I think we can close this now. Thanks for the help! |
Wow that const thing is wild, you might want to escalate the issue in the Next.js repo. Thanks for the follow-up! The V2 branch will be merged and released once Next.js 15 is out. |
I was experimenting with getting our app FixMyBerlin/atlas-app#111 build with the preview of the React Compiler.
When I run
npm run build
I get a few errors that mention nuqs:The text was updated successfully, but these errors were encountered: