react-tree-walker
react-tree-walker copied to clipboard
Update index.js
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.
Codecov Report
Merging #41 into master will decrease coverage by
0.87%. The diff coverage is66.66%.
@@ 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%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2fd7257...8105d8f. Read the comment docs.
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?