From 9ee3ced3b55f563e4885ccd706cad547ebc05d96 Mon Sep 17 00:00:00 2001 From: Mikel Tuesta Date: Mon, 22 Oct 2018 10:58:17 +0200 Subject: [PATCH 1/2] Removed deprecated dependency. Updated the for the provided one. --- CHANGELOG.md | 2 ++ docs/browser_intl_provider_strategies.md | 4 ++-- package.json | 6 +++--- src/component/bridges/ReduxBrowserIntlProvider.js | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ffdcca..ec66a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This changelog references the relevant changes done between versions. To get the diff for a specific change, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/compare/v0.4.0...v0.5.0 +* 0.6.0 + * Removed deprecated `react-router-redux` dependency. Updated the `ConnectedRouter` for the `connected-react-router` provided one. * 0.5.2 * Fixed unprefixed strategy when URL starts with another locale. * 0.5.1 diff --git a/docs/browser_intl_provider_strategies.md b/docs/browser_intl_provider_strategies.md index 753d2ea..bd9f3ba 100644 --- a/docs/browser_intl_provider_strategies.md +++ b/docs/browser_intl_provider_strategies.md @@ -34,18 +34,18 @@ const history = createHistory(); This strategy apart of intl provider also exposes a fully functional reducer that fires when also exposed `LANGUAGE_CHANGE` event is dispatched in the Redux actions. +Check the [https://github.com/supasate/connected-react-router](connected-react-router) library to setup your connected router. + ```javascript import {LANGUAGE_CHANGE} from '@foes/react-i18n-routing'; // ... other module of your application import {i18nReducer} from '@foes/react-i18n-routing'; -import {routerReducer} from 'react-router-redux'; import {combineReducers} from 'redux'; export default combineReducers({ i18n: i18nReducer, - routing: routerReducer, // your other reducers }); diff --git a/package.json b/package.json index b6a6dec..8268a73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@foes/react-i18n-routing", - "version": "0.5.2", + "version": "0.6.0", "license": "MIT", "description": "Provides components and functions to make i18n routing React apps with ease.", "keywords": [ @@ -122,13 +122,13 @@ "rimraf": "^2.6.2" }, "peerDependencies": { + "connected-react-router": "^4.5.0", "lodash.flatmap": ">=4.x", "prop-types": ">=15.x", "react": ">=16.x", "react-intl": ">=2.x", "react-redux": ">=5.x", "react-router-dom": ">=4.x", - "react-router-named-routes": ">=0.x", - "react-router-redux": ">=4.x" + "react-router-named-routes": ">=0.x" } } diff --git a/src/component/bridges/ReduxBrowserIntlProvider.js b/src/component/bridges/ReduxBrowserIntlProvider.js index 6da61de..f599bb1 100755 --- a/src/component/bridges/ReduxBrowserIntlProvider.js +++ b/src/component/bridges/ReduxBrowserIntlProvider.js @@ -9,7 +9,8 @@ import React from 'react'; import {connect} from 'react-redux'; -import {ConnectedRouter} from 'react-router-redux'; +// import {ConnectedRouter} from 'react-router-redux'; +import {ConnectedRouter} from 'connected-react-router'; import PropTypes from 'prop-types'; import {setLocale} from './../../locale.js'; From 3585fdc7e597efd78d4cf9ba230b5ed5678f8eef Mon Sep 17 00:00:00 2001 From: Mikel Tuesta Date: Mon, 22 Oct 2018 10:59:28 +0200 Subject: [PATCH 2/2] Removed commented code --- src/component/bridges/ReduxBrowserIntlProvider.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/component/bridges/ReduxBrowserIntlProvider.js b/src/component/bridges/ReduxBrowserIntlProvider.js index f599bb1..e3bf303 100755 --- a/src/component/bridges/ReduxBrowserIntlProvider.js +++ b/src/component/bridges/ReduxBrowserIntlProvider.js @@ -9,7 +9,6 @@ import React from 'react'; import {connect} from 'react-redux'; -// import {ConnectedRouter} from 'react-router-redux'; import {ConnectedRouter} from 'connected-react-router'; import PropTypes from 'prop-types';