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.

WithRedux has to be used only for top level pages, all other components has to be wrapped in connect - Breaking change introduced in minor version

See original GitHub issue

Minor version update 1.3.1 breaks node.js rendering of WithRedux. This is critical issue, avoid latest release.

Error: WithRedux has to be used only for top level pages, all other components has to be wrapped in connect at initStore (/var/app/current/node_modules/next-redux-wrapper/src/index.js:33:15) at WrappedCmp (/var/app/current/node_modules/next-redux-wrapper/src/index.js:95:19) at ReactCompositeComponentWrapper._constructComponentWithoutOwner (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:308:14) at ReactCompositeComponentWrapper._constructComponent (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:284:19) at ReactCompositeComponentWrapper.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:187:21) at Object.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactReconciler.js:45:35) at ReactCompositeComponentWrapper.performInitialMount (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:370:34) at ReactCompositeComponentWrapper.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:257:21) at Object.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactReconciler.js:45:35) at ReactCompositeComponentWrapper.performInitialMount (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:370:34) at ReactCompositeComponentWrapper.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:257:21) at Object.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactReconciler.js:45:35) at ReactCompositeComponentWrapper.performInitialMount (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:370:34) at ReactCompositeComponentWrapper.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:257:21) at Object.mountComponent (/var/app/current/node_modules/react-dom/lib/ReactReconciler.js:45:35) at ReactCompositeComponentWrapper.performInitialMount (/var/app/current/node_modules/react-dom/lib/ReactCompositeComponent.js:370:34)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kirill-konshincommented, Jul 27, 2017

OK, I will change this to a warning.

0reactions
kirill-konshincommented, Jul 27, 2017

Released 1.3.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

<Provider> misses state changes that occur between when its ...
The withRedux decorator in the repro case simplifies this by wrapping a dynamically loaded component (such as the Route component in the example) ......
Read more >
Why redux suggests to only connect to top level components?
While technically you can connect() any component in your app to Redux store, avoid doing this too deeply, because it will make the...
Read more >
React Redux connect(): When and how to use it
Calling the connect() function returns a higher order component, which can be used to wrap any React component. Since a higher order component...
Read more >
Do React Hooks Replace Higher Order Components (HOCs)?
I call that one withRedux . Once Redux is connected, other HOCs can access the state to authorize users, etc. The pattern of...
Read more >
Using state from your Store in your views - Human Redux
Then your components only have a single concern: render the current state. ... handles re-rendering the component if any of that "connected state"...
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