question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-blessed not working with react-redux

See original GitHub issue

Copying from the response to a question I asked here

  • there’s a bug somehow between react-blessed and react-reconciler that is causing useEffect cleanup functions to be run when they shouldn’t be. This may be due to react-blessed keeping around this runningEffects array, or it may be due to something odd in this specific version of react-reconciler. Either way, the root cause of the behavior you’re seeing is that Provider is unsubscribed when it shouldn’t be because it was calling useEffect , and then having its cleanup function run when you dispatched a new Redux action and queued a UI update. That caused a flush of passive effects, which hits this bit:
function flushPassiveEffects() {
  if (passiveEffectCallbackHandle !== null) {
    cancelPassiveEffects(passiveEffectCallbackHandle);
}
  • however, I’m seeing that passiveEffectCallbackHandle is undefined, not null, so it’s erroneously trying to call cancelPassiveEffects(). That seems like a bug in this version of react-reconciler.

  • That then causes react-blessed to try to clean up its runningEffects array, which nukes the effect handler

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Yomguitherealcommented, Feb 6, 2021

v0.7.0 should have fixed this issue? Can someone confirm and close the issue or ask me to do it please?

0reactions
zcaudatecommented, Feb 7, 2021

yep. it’s working for me too!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react redux store updates once and then stops updating
The first problem here is that you need to be using the "alternate ... react-blessed is using an old version of react-reconciler which...
Read more >
Issues · Yomguithereal/react-blessed - GitHub
A react renderer for blessed. Contribute to Yomguithereal/react-blessed development by creating an account on GitHub.
Read more >
Troubleshooting | React Redux
Make sure you don't have multiple instances/copies of React Redux in your project. Make sure you didn't forget to wrap your root or...
Read more >
Understanding Redux: A tutorial with examples
In this tutorial, we'll show you what Redux is, why you should use it, and how it works. We'll demo using a simple...
Read more >
Are You Still Managing React State With Plain Redux?
If I want to add or modify an action or reducer, I need to update three or more files! Pain point #2. Plain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found