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.

Support React-Redux v6.

See original GitHub issue

React-Redux v6 will use React’s ( new ) context api which is not compatible with the legacy context API. By accessing store from context ( reference ) it causes the app to break when it tries to dispatch the LOCATION_CHANGE action.

As @timdoor has described in its breaking changes:

Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both <Provider> and <ConnectedComponent>. You may also pass {context : MyContext} as an option to connect.

Related React-Redux links:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
supasatecommented, Nov 25, 2018

Based on @wgao19’s fix, I made a PoC in #191. Please check it out and let me know what you all think.

Update: I just published it as connected-react-router@next (v6.0.0-beta.1).

2reactions
ahcecommented, Dec 5, 2018

connected-react-router 6.0.0-beta.1 works for me with react-redux 6.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connect | React Redux
Overview​. The connect() function connects a React component to a Redux store. It provides its connected component with the pieces of the ...
Read more >
Upgrading to React-Redux v6: Around the New Context API
In this writeup I will cover the following topics about React-Redux v6: Using custom context; Accessing the store; Supporting multiple stores.
Read more >
Use of React router v6 history/Navigate in redux [duplicate]
Closed 11 months ago. I'm trying to use history.push("/") from react router v6 to redirect when action is dispatched from ...
Read more >
Upgrading to React-Redux v6: Around ... - A Work in Progress
In this writeup I will cover the following topics about React-Redux v6: Using custom context; Accessing the store; Supporting multiple ...
Read more >
7 MERN Tutorial || React Redux Toolkit || React Router v6
In this video, we are going to create react app. We have used the redux toolkit for state management. And React router dom...
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