Closed speakingcode closed 3 years ago
Ok @speakingcode. Let met merge this then, check some things and release as v0.7.0 on npm soon.
Ok I have found an issue with the remove
example. It seems node removal is broken. I am currently investigating.
I struggle to find a solution. To reproduce, just run npm run demo remove
.
Ok I found a fix as per https://github.com/Yomguithereal/react-blessed/commit/b38c2a75b99cba5e77f7182a036551f1e4000b7c. It was a tricky one to find...
Will try to upgrade devtools & prepare peer deps for a release soon.
v0.7.0 is now live on npm
Good find! sorry about the overlook of that test, and thanks for accepting the PR!
@speakingcode, @Yomguithereal
There's still an issue with this:
The counter example works fine:
but in the game of life example:
next
and start
(for the timer) uses a call next_fn
next
renders correctly - the counter updates and the grid updates to the next statestart
will render the updated counter but not update the grid to the next state@zcaudate I am trying to find what could be the issue here but to no avail. Could you try to reproduce the issue: 1. without immer and 2. while wrapping your interval in a useEffect to avoid bypassing react's lifecycle?
@Yomguithereal: It actually works when setInterval is put into useEffect. Thanks for the tip.
the repo without immer is here:
So the question would then be: would your example work for instance with react-dom
? The underlying question is of course: should I fix something? Can I fix something :) ?
I think it is fixed. I'll try it out with react-dom
in a couple of days but I think the problem was use of setInterval outside of react lifecycle.
Fair enough. Keep me informed when you do so :)
Per #115, react-blessed needs to update to new
react-reconciler
to avoid bugs related to flushing passive effects (for example causing react-redux subscriptions to clean up when they should not). This required some changes to the HostConfig. I also updated the"test"
script entry inpackage.json
and the.babelrc
config so that mocha would properly run tests with current babel, with module support.npm test
passes and manually checking demos works as well.