We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi somehow i am unable to run project with nav reducer from your code. In order to make it work i had to create reducer inside AppNavigator like this:
const navReducer = createNavigationReducer(RootNavigator); const reducer = combineReducers({ nav: navReducer, });
and change configureStore (in my case just store) to this:
const store = createStore( reducer, applyMiddleware(middleware, thunkMiddleware, loggerMiddleware), );
App is still working the same I think after this changes...but i cant change the status bar now like u did
Here is the full code of AppNavigator.js
import { createStore, applyMiddleware, combineReducers, } from 'redux'; import { reduxifyNavigator, createReactNavigationReduxMiddleware, createNavigationReducer, } from 'react-navigation-redux-helpers'; import { createLogger } from 'redux-logger'; import thunkMiddleware from 'redux-thunk'; import { connect } from 'react-redux'; import React from 'react'; import RootNavigator from './RootNavigator' const navReducer = createNavigationReducer(RootNavigator); const reducer = combineReducers({ nav: navReducer, }); // Note: createReactNavigationReduxMiddleware must be run before reduxifyNavigator const middleware = createReactNavigationReduxMiddleware( "root", state => state.nav, ); const App = reduxifyNavigator(RootNavigator, "root"); const mapStateToProps = (state) => ({ state: state.nav, }); const AppWithNavigationState = connect(mapStateToProps)(App); const loggerMiddleware = createLogger({ predicate: () => __DEV__ }); const store = createStore( reducer, applyMiddleware(middleware, thunkMiddleware, loggerMiddleware), ); const Root = () => <AppWithNavigationState />; export { store, Root, };
I am using react-navigation v3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi somehow i am unable to run project with nav reducer from your code.
In order to make it work i had to create reducer inside AppNavigator like this:
and change configureStore (in my case just store) to this:
App is still working the same I think after this changes...but i cant change the status bar now like u did
Here is the full code of AppNavigator.js
I am using react-navigation v3
The text was updated successfully, but these errors were encountered: