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 not updating immediately #1

Closed
biowaffeln opened this issue Aug 16, 2022 · 2 comments
Closed

state not updating immediately #1

biowaffeln opened this issue Aug 16, 2022 · 2 comments

Comments

@biowaffeln
Copy link

Hey Jay! Just discovered the library and tried to give it a spin by creating a simple todo list example, but I couldn't quite get it working. Here's the example:

https://stackblitz.com/edit/vitejs-vite-duyj73

Specifically, there's these issues:

  1. When I add the first todo it only appears after I add a second one
  2. Similarly the "done" toggle only renders after I click on it a few times
  3. Whenever the file gets hot-reloaded, the example stops working completely

Am I missing anything or is this a bug? Using 0.11.0-beta.2 btw.

@jmeistrich
Copy link
Contributor

Interesting! It's caused by StrictMode, removing StrictMode makes it work. I'm investigating to fix it.

jmeistrich added a commit that referenced this issue Aug 17, 2022
…not be needed anymore. This change also fixes StrictMode not working #1.
@jmeistrich
Copy link
Contributor

Fixed in beta.3. I updated a fork of your stackblitz with it updated, and it looks to be working correctly now: https://stackblitz.com/edit/vitejs-vite-5jmraw

The fix also made it slightly faster too :).

Thanks for the report!

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