From bc9778707551ab3714a9fdb4a29e3a5d71f36cac Mon Sep 17 00:00:00 2001 From: ActuallyMentor Date: Thu, 13 Feb 2020 10:24:23 +0100 Subject: [PATCH] Refer to non-deprecated alternative for redux syncing --- docs/README.md | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/docs/README.md b/docs/README.md index a6b0d1e..76783e5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -31,38 +31,4 @@ function handleHardwareBackPress(router) { ### Redux Support -Redux is supported via [react-router-redux](https://github.com/reactjs/react-router-redux). The following example was adopted from the package's [README](https://github.com/reactjs/react-router-redux/blob/master/README.md): - -```javascript -import React from 'react' -import { createStore, combineReducers, applyMiddleware } from 'redux' -import { Provider } from 'react-redux' -import { Router, nativeHistory } from 'react-router-native'; -import { syncHistoryWithStore, routerReducer } from 'react-router-redux' - -import reducers from '/reducers' - -// Add the reducer to your store on the `routing` key -const store = createStore( - combineReducers({ - ...reducers, - routing: routerReducer - }) -) - -// Create an enhanced history that syncs navigation events with the store -const history = syncHistoryWithStore(nativeHistory, store) -// Set current path to '/' -history.push('/') - -const routes = ( - - /* Tell the Router to use our enhanced history */ - - /* ... */ - - -); - -AppRegistry.registerComponent('YourApp', () => () => routes); -``` +Redux is supported via [connected-react-router](https://github.com/supasate/connected-react-router). For up-to-date implementation instructions see the package's [README](https://github.com/supasate/connected-react-router/blob/master/README.md). \ No newline at end of file