Closed dlech closed 1 year ago
I'm sure this needs more testing but I did check that it does not regress the bug mentioned in https://github.com/lukasbach/react-complex-tree/issues/76#issue-1248751879.
Cool, thanks a lot! I'll merge if for now and do some testing on the deployment.
Using
setTimeout()
to defer setting state in React causes issues with testing, particularly with@testing-library/react
. It prints errors to the console that an action is not wrapped inact()
.This reworks the code to avoid the defered state update.
Solves #TODO
@lukasbach