O
O
Ostic2019-05-30 07:15:50
React
Ostic, 2019-05-30 07:15:50

Which package and package version to use for redux + router?

Hello.
There is such a thing
as react-router-redux
, it is Depricated
further

For your Redux <-> Router syncing needs with React Router 4+, please see one of these libraries instead:
  • connected-react-router

but the connected-react-router page says:
v6.0.0 requires React v16.4.0 and React Redux v6.0. (It does not support React Redux v7.0 yet. We're looking into the compability issue.)

even though the command
yarn add react-redux
sets 1. So you need to downgrade the version of react-redux? 2. For whom, then, is version 7.0.3 installed if you can’t legalize it with anything? ( react-router-redux does not plow, the alternative that is offered is only one - this is connected-react-router , and it, in turn, does not support " react-redux": "^7.0.3" )
"react-redux": "^7.0.3"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-05-30
@Ostic

1. It is better to do the opposite and not use obsolete packages.
2. yarn add react-reduxinstalls a stable, recommended version of the package.
Typically, projects do not need to use libraries like react-router-redux or connected-react-router. Throw a couple of lines of code into the store history on your own, if necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question