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
Cannot update state inside setInterval #351
Comments
@defint thx for the issue, it a pretty weird thing, but I m sure your |
@artalar I found the problem, it lies in the way the react handles events. I will try to dive deeper into the topic, leave links that helped me. |
@defint quick solution for you |
Additional info from me - I'm using action dispatchin on websocket event, effectively every second, I also didn't get updates and also was fixed by removing react strict mode |
I will try to use |
Hello
I have to change the atom value inside setInterval function.
My first version of the code:
https://gist.github.com/defint/3faffb974ab76b1f7aa8adf0ff2ebadb
It doesn't work.
My second version of the code with auto-clicking on the button:
https://gist.github.com/defint/fcf383dda69a934bfa411c2b89b72bc4
It works fine.
Can you please describe how to change the state without auto-clicking?
The text was updated successfully, but these errors were encountered: