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.

Component not rerendering when passing store manually to components

See original GitHub issue

Hi Guys,

I posted this question on stackoverflow.

https://stackoverflow.com/questions/45874911/component-not-rerendering-when-passing-store-manually-to-components-react-redux

Basically, I am having an issue where my components are connected initially but, I don’t get the subsequence updates despite ensuring that states are immutable.

I am writing an application that dynamically renders react components from json definitions. The renderer component has its own store, and the dynamically generated component tree is from another store. I did not use Provider for the 2nd one. I am passing them manually as seen from the question above.

I can give more context if needed. Thanks for any advice/help!

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
markeriksoncommented, Aug 29, 2017

Heh. Glad you got that figured out. (The best kind of problem report - one that resolves itself without me having to do anything! 😃 )

0reactions
clydeespenocommented, Aug 28, 2017

Found the issue. I was using an older version of react-redux (5.0.2) which contains the bug described here: https://github.com/reactjs/react-redux/pull/589.

Thanks @markerikson. My bad, I did not even check whether my version was already outdated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React not re-rendering child component after updating state ...
The Grid component's resetPaint state var is changed from false to true; This causes a re-render of Grid with resetPaint set to true;...
Read more >
How and when to force a React component to re-render
React automatically re-renders components, but what happens when a component is not updating as expected? Find out what you can do here.
Read more >
When does React re-render components? - Felix Gerschau
Want to see re-rendering in action? React DevTools lets you highlight renders under Components -> View Settings -> Highlight updates when ...
Read more >
5 Ways to Avoid React Component Re-Renderings
In this article, I have discussed 5 different methods to prevent unnecessary re-rendering in React components. Most of these solutions capitalize caching, and ......
Read more >
Hooks FAQ - React
Do Hooks replace render props and higher-order components? ... There are no plans to remove classes from React — we all need to...
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