-
Notifications
You must be signed in to change notification settings - Fork 33
Update index.js #41
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
Update index.js #41
Conversation
implement setState done callback
Codecov Report
@@ Coverage Diff @@ ## master #41 +/- ## ========================================== - Coverage 96.11% 95.23% -0.88% ========================================== Files 1 1 Lines 103 105 +2 Branches 31 32 +1 ========================================== + Hits 99 100 +1 - Misses 4 5 +1
Continue to review full report at Codecov.
|
Hey @CosticaPuntaru
Thanks for raising this.
Hmmm, interesting. Is it expected for the callbacks to be executed synchronously in a server rendering context? What is the default React behaviour around this?
https://reactjs.org/docs/react-component.html#setstate
react setState takes two parameters,
updaterandcallback. As i think the api should respect the react api i suggest to add callback to thesetStatefunction.