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-redux 7 uses useMemo, all Connected components complaining

See original GitHub issue

Great job on the new release! I just updated react-redux to 7.0.1 and WDYR is complaining about every single one. How should we handle this?

Connect(Header)
whyDidYouRender.min.js:8 {Connect(Header): ƒ} "Re-rendered because of hook changes:"
whyDidYouRender.min.js:8 hook useMemo 
whyDidYouRender.min.js:8 different React elements with the same displayName. (more info at http://bit.ly/wdyr3)
whyDidYouRender.min.js:8 {"prev ": {…}} "!==" {"next ": {…}}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
vzaidmancommented, Apr 13, 2019

solved in react-redux@7.0.2 (by me 😛)

2reactions
vzaidmancommented, Apr 12, 2019

I believe we discovered a small performance issue with react-redux 😃 I fixed it there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use React.memo with react-redux connect?
memo is to check if all the new props received by the component are the same as the last props. If any HOC...
Read more >
Understanding common frustrations with React Hooks
React Hooks can be frustrating despite their popularity and widespread use. Learn about some of the drawbacks to using React Hooks.
Read more >
React.useMemo and when you should use it - everyday.codes
memo should only be applied to pure components. Another issue has to do with Redux/Context and hooks. Before hooks, the Redux selectors passed ......
Read more >
The Hate around Redux and co? : r/reactjs - Reddit
I recently built a small ToDoList app where the AddItemForm was a separate component that was packed in another component and I found...
Read more >
Why React Re-Renders | Hacker News
He says "useRef offering a connection to DOM elements is just sugar", but that's not ... Probably better to use useMemo with []...
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