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

State resets upon fast-refreshing #14

Closed
Adam13531 opened this issue Jun 3, 2023 · 1 comment
Closed

State resets upon fast-refreshing #14

Adam13531 opened this issue Jun 3, 2023 · 1 comment

Comments

@Adam13531
Copy link

Update

I'm nearly positive that this isn't actually a bug; I was just on autopilot and never modified my next.config.js to contain swcPlugins as the README specifies, so of course I'm experiencing the behavior that I described below. 🤦‍♂️ I'm filing this issue only to immediately close it in case anyone else is like me and:

  • Didn't read the README 😛
  • Expects to find a closed issue on GitHub

(the sliver of doubt about whether this is a bug is because I'm hitting #6 and #13, both of which are caused by this unresolved issue)

The "issue"

This is very similar to this issue in the Jotai repo, but with @swc-jotai/react-refresh instead of the "regular" react-refresh.

Minimal repro:

  • Open this sandbox
  • Click "Increment" a few times
  • Make any edit to atom.ts (including modifying a comment) and save the file

Repro video:

repro.mp4

Expected outcome: the counter's value remains > 0.
Actual outcome: the counter resets to 0.

@Adam13531
Copy link
Author

(closing for reasons mentioned in the original post)

@Adam13531 Adam13531 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
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

1 participant