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.

mapStateToProps not always called after upgrading to 5.0.1

See original GitHub issue

I have a boolean value inside a reducer and the mapStateToProps is not always called when the value changes.

Here’s the log from 4.4.6:

[mapStateToProps] showResults false
[reducer] previous value: false ; new value: true
[mapStateToProps] showResults true
[reducer] previous value: true ; new value: false
[mapStateToProps] showResults false

But here’s the one from 5.0.1:

[mapStateToProps] showResults false
[reducer] previous value: false ; new value: true
[mapStateToProps] showResults true
[reducer] previous value: true ; new value: false
[reducer] previous value: false ; new value: false

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jimbollacommented, Dec 21, 2016

Yep. Just submitted PR #584 to fix this use case.

0reactions
markeriksoncommented, Dec 21, 2016

@jimbolla : I’d say that if we can fix it without much hassle, then we might as well go ahead and do so. Sounds like it’s “just” a matter of adding a couple more entries to context, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

MapStateToProps not being called after changing STATE in ...
So you can see the action is happening and the reducer state is updating, but there is not update in component side !...
Read more >
Connect | React Redux
If your mapStateToProps function is declared as taking two parameters, it will be called whenever the store state changes or when the ...
Read more >
Your First Immutable React & Redux App - ReactJS News
I'd like to make everything seem as simple as possible so that you can wrap your head around it. After all, how hard...
Read more >
react-redux: Versions - Openbase
When we migrated React-Redux to TS, we copied over all of the types from that package as a ... mapStateToProps not always called...
Read more >
react-redux Getting started with react-redux - RIP Tutorial
React components aware of the Redux store are called... ... Since all container componenents need to access the Redux store, ... 5.0.1, 2016-12-14....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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