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
enable @swc-jotai/react-refresh
in [email protected] will cause pages using 'use client' error
#21
Comments
I am getting this error as well. Next.js Development experience with all the full reloads is not great 🤣 |
I'm getting this error in Next.js |
I also got the same problem with Next.js |
I had my atoms in a seperate file and it worked. Just don't add "use client" to the atom file but just the componet file and import the atoms. Worked for me until I started using focusAtom which caused another issue: #24. So currently I forcibly stopped using the plugin. |
reproduce step
jotai
and@swc-jotai/react-refresh
@swc-jotai/react-refresh
innext.config.js
reproduce repo
https://github.com/seiry/jotai-refresh-use-client/blob/e2f069f9761f35c75d23a9e71f6a13a279275e9a/next.config.js#L6
log
It seems the plugin added some line at the file header.( sorry I'm not a rust master lol
The text was updated successfully, but these errors were encountered: