Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { createReactNavigationReduxMiddleware, createNavigationReducer, reduxifyNavigator } from 'react-navigation-redux-helpers';
import { connect } from 'react-redux';
// Middlewares
import createSagaMiddleware from 'redux-saga';
// Saga's
import user from './reducers/sagas/user'
import schedule from './reducers/sagas/schedule'
import evaluations from './reducers/sagas/evaluations'
import * as reducers from './reducers';
export default navigator => {
const navReducer = createNavigationReducer(navigator)
const reducer = combineReducers({
nav: navReducer,
const sagaMiddleware = createSagaMiddleware()
const navMiddleware = createReactNavigationReduxMiddleware(
state => state.nav
const store = createStore(
const App = reduxifyNavigator(navigator, "root")
const mapStateToProps = state => ({ state: state.nav })
const AppWithNavigationState = connect(mapStateToProps)(App)
// Run Saga's
return { store, AppWithNavigationState }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.