diff --git a/boilerplate/App/Navigation/ReduxNavigation.js b/boilerplate/App/Navigation/ReduxNavigation.js index eb11453..8914469 100644 --- a/boilerplate/App/Navigation/ReduxNavigation.js +++ b/boilerplate/App/Navigation/ReduxNavigation.js @@ -7,7 +7,7 @@ import { import { connect } from 'react-redux' import AppNavigation from './AppNavigation' -createReactNavigationReduxMiddleware( +export const appNavigatorMiddleware = createReactNavigationReduxMiddleware( 'root', (state) => state.nav ) diff --git a/boilerplate/App/Redux/CreateStore.js b/boilerplate/App/Redux/CreateStore.js index 963275e..e812532 100644 --- a/boilerplate/App/Redux/CreateStore.js +++ b/boilerplate/App/Redux/CreateStore.js @@ -2,7 +2,7 @@ import { createStore, applyMiddleware, compose } from 'redux' import Config from '../Config/DebugConfig' import createSagaMiddleware from 'redux-saga' import ScreenTracking from './ScreenTrackingMiddleware' -import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers' +import { appNavigatorMiddleware } from '../Navigation/ReduxNavigation' // creates the store export default (rootReducer, rootSaga) => { @@ -12,11 +12,7 @@ export default (rootReducer, rootSaga) => { const enhancers = [] /* ------------- Navigation Middleware ------------ */ - const navigationMiddleware = createReactNavigationReduxMiddleware( - 'root', - state => state.nav - ) - middleware.push(navigationMiddleware) + middleware.push(appNavigatorMiddleware) /* ------------- Analytics Middleware ------------- */ middleware.push(ScreenTracking)