I'm trying to integrate redux with the navigator and getting an error saying Cannot read property 'getRoute' of undefined when I run the app. The following is my navigationContext (taken from the example):
const navigationContext = new NavigationContext({
router: Router,
store: Store,
});
My store:
The reducers are combined in my reducers.js file and exported from there so the navigation: NavigationReducer is accounted for.
const createStoreWithNavigation = createNavigationEnabledStore({
createStore,
navigationStateKey: 'navigation',
});
const store = createStoreWithNavigation(
combineReducers({
navigation: NavigationReducer,
// my other reducers,
}),
);
export default store;
When I replace the context={navigationContext} with the old router={Router}, it works fine. I guess I'm doing something wrong with the navigationContext but am not sure what it is. From what I understand, a context is needed in order to hold the navigation in the store. Any suggestions would be much appreciated
I'm trying to integrate redux with the navigator and getting an error saying
Cannot read property 'getRoute' of undefined
when I run the app. The following is my navigationContext (taken from the example):My store:
The reducers are combined in my
reducers.js
file and exported from there so thenavigation: NavigationReducer
is accounted for.My index.js:
When I replace the
context={navigationContext}
with the oldrouter={Router}
, it works fine. I guess I'm doing something wrong with thenavigationContext
but am not sure what it is. From what I understand, a context is needed in order to hold the navigation in the store. Any suggestions would be much appreciated