connected-react-router
Advanced tools
Comparing version 6.3.2 to 6.4.0
@@ -126,3 +126,3 @@ # Frequently Asked Questions | ||
import React from 'react' | ||
import { Route, Switch } from 'react-router' /* react-router v4 */ | ||
import { Route, Switch } from 'react-router' /* react-router v4/v5 */ | ||
import { ConnectedRouter } from 'connected-react-router' | ||
@@ -129,0 +129,0 @@ |
@@ -31,5 +31,9 @@ declare module 'connected-react-router' { | ||
type: typeof LOCATION_CHANGE; | ||
payload: RouterState; | ||
payload: LocationChangePayload; | ||
} | ||
export interface LocationChangePayload extends RouterState{ | ||
isFirstRendering: boolean; | ||
} | ||
export interface CallHistoryMethodAction<A = any[]> { | ||
@@ -36,0 +40,0 @@ type: typeof CALL_HISTORY_METHOD; |
{ | ||
"name": "connected-react-router", | ||
"version": "6.3.2", | ||
"description": "A Redux binding for React Router v4", | ||
"version": "6.4.0", | ||
"description": "A Redux binding for React Router v4 and v5", | ||
"main": "lib/index.js", | ||
@@ -32,2 +32,3 @@ "module": "esm/index.js", | ||
"immutable": "^3.8.1", | ||
"prop-types": "^15.7.2", | ||
"seamless-immutable": "^7.1.3" | ||
@@ -37,6 +38,5 @@ }, | ||
"history": "^4.7.2", | ||
"prop-types": "^15.0.0 || ^16.0.0", | ||
"react": "^16.4.0", | ||
"react-redux": "^6.0.0", | ||
"react-router": "^4.3.1", | ||
"react-router": "^4.3.1 || ^5.0.0", | ||
"redux": "^3.6.0 || ^4.0.0" | ||
@@ -65,4 +65,3 @@ }, | ||
"eslint-plugin-react": "^7.11.1", | ||
"jest": "^23.6.0", | ||
"prop-types": "^15.5.8", | ||
"jest": "^24.3.1", | ||
"raf": "^3.4.0", | ||
@@ -72,3 +71,3 @@ "react": "^16.4.0", | ||
"react-redux": "^6.0.0", | ||
"react-router": "^4.3.1", | ||
"react-router": "^4.3.1 || ^5.0.0", | ||
"react-test-renderer": "^16.0.0", | ||
@@ -75,0 +74,0 @@ "redux": "^4.0.0", |
@@ -7,3 +7,3 @@ > Breaking change in v5.0.0! Please read [How to migrate from v4 to v5](https://github.com/supasate/connected-react-router/blob/master/FAQ.md#how-to-migrate-from-v4-to-v5). | ||
====================== | ||
A Redux binding for React Router v4 | ||
A Redux binding for React Router v4 and v5 | ||
@@ -14,3 +14,3 @@ Main features | ||
:gift: Support [React Router v4](https://github.com/ReactTraining/react-router). | ||
:gift: Support [React Router v4 and v5](https://github.com/ReactTraining/react-router). | ||
@@ -95,3 +95,3 @@ :sunny: Support functional component hot reloading while preserving state (with [react-hot-reload](https://github.com/gaearon/react-hot-loader)). | ||
- Wrap your react-router v4 routing with `ConnectedRouter` and pass the `history` object as a prop. | ||
- Wrap your react-router v4/v5 routing with `ConnectedRouter` and pass the `history` object as a prop. Remember to delete any usage of `BrowserRouter` or `NativeRouter` as leaving this in will [cause](https://github.com/supasate/connected-react-router/issues/230#issuecomment-461628073) [problems](https://github.com/supasate/connected-react-router/issues/230#issuecomment-476164384) synchronising the state. | ||
- Place `ConnectedRouter` as a child of `react-redux`'s `Provider`. | ||
@@ -103,3 +103,3 @@ | ||
import { Provider } from 'react-redux' | ||
import { Route, Switch } from 'react-router' // react-router v4 | ||
import { Route, Switch } from 'react-router' // react-router v4/v5 | ||
import { ConnectedRouter } from 'connected-react-router' | ||
@@ -113,3 +113,3 @@ import configureStore, { history } from './configureStore' | ||
<ConnectedRouter history={history}> { /* place ConnectedRouter under Provider */ } | ||
<> { /* your usual react-router v4 routing */ } | ||
<> { /* your usual react-router v4/v5 routing */ } | ||
<Switch> | ||
@@ -116,0 +116,0 @@ <Route exact path="/" render={() => (<div>Match</div>)} /> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
466577
35
8800
+ Addedprop-types@^15.7.2
+ Addedreact-router@5.3.4(transitive)
- Removedhoist-non-react-statics@2.5.5(transitive)
- Removedreact-router@4.3.1(transitive)
- Removedwarning@4.0.3(transitive)