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

Update index.js #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

CosticaPuntaru
Copy link

https://reactjs.org/docs/react-component.html#setstate

react setState takes two parameters, updater and callback. As i think the api should respect the react api i suggest to add callback to the setState function.

implement setState done callback
@codecov
Copy link

codecov bot commented Sep 25, 2018

Codecov Report

Merging #41 into master will decrease coverage by 0.87%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/index.js 95.23% <66.66%> (-0.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fd7257...8105d8f. Read the comment docs.

@ctrlplusb
Copy link
Owner

ctrlplusb commented Oct 30, 2018

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?

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

Successfully merging this pull request may close these issues.

None yet

2 participants