From e9665469fe859d0f3dc3bcc85ad582a30fdcca75 Mon Sep 17 00:00:00 2001 From: Pavel Galeta Date: Mon, 20 May 2019 13:00:45 +0300 Subject: [PATCH 1/3] export appNavigatorMiddleware --- boilerplate/App/Navigation/ReduxNavigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) From 60a89939a5f1ab40a849895590b187a662d79c1f Mon Sep 17 00:00:00 2001 From: Pavel Galeta Date: Mon, 20 May 2019 13:02:15 +0300 Subject: [PATCH 2/3] push appNavigatorMiddleware --- boilerplate/App/Redux/CreateStore.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/boilerplate/App/Redux/CreateStore.js b/boilerplate/App/Redux/CreateStore.js index 963275e..0a12fd6 100644 --- a/boilerplate/App/Redux/CreateStore.js +++ b/boilerplate/App/Redux/CreateStore.js @@ -3,6 +3,7 @@ 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 +13,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) From da16111377741838cc846f6592e89f8f8960d193 Mon Sep 17 00:00:00 2001 From: Pavel Galeta Date: Mon, 20 May 2019 13:47:31 +0300 Subject: [PATCH 3/3] remove createReactNavigationReduxMiddleware --- boilerplate/App/Redux/CreateStore.js | 1 - 1 file changed, 1 deletion(-) diff --git a/boilerplate/App/Redux/CreateStore.js b/boilerplate/App/Redux/CreateStore.js index 0a12fd6..e812532 100644 --- a/boilerplate/App/Redux/CreateStore.js +++ b/boilerplate/App/Redux/CreateStore.js @@ -2,7 +2,6 @@ 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