Closed keshidong closed 5 years ago
About the second parameter setState of useState hook, fn may not be executed when setState(s, fn) . Execute setState(s, fn), the fn will not be called when s not changed.
setState
setState(s, fn)
fn
s
Resolved by Pull request #9
About the second parameter
setState
of useState hook, fn may not be executed whensetState(s, fn)
. ExecutesetState(s, fn)
, thefn
will not be called whens
not changed.