react-tree-walker icon indicating copy to clipboard operation
react-tree-walker copied to clipboard

Update index.js

Open CosticaPuntaru opened this issue 7 years ago • 2 comments

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.

CosticaPuntaru avatar Sep 25 '18 15:09 CosticaPuntaru

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%) :arrow_down:

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.

codecov[bot] avatar Sep 25 '18 15:09 codecov[bot]

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?

ctrlplusb avatar Oct 30 '18 10:10 ctrlplusb