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
In the app/src/state/index.js file Add the following code: import { createStore, compose, applyMiddleware } from 'redux'; import { fromJS } from 'immutable'; import createSagaMiddleware from 'redux-saga'; import devTools from 'remote-redux-devtools'; import Parse from 'parse/react-native'; import { AsyncStorage } from 'react-native'; import { persistStore, autoRehydrate } from 'redux-persist-immutable'; import createReducer from './reducers'; import sagas from '../sagas'; import Settings from '../settings'; const settings = Settings.load(); Parse.initialize(settings.parseServerApplicationId); Parse.serverURL = settings.parseServerURL; const sagaMiddleware = createSagaMiddleware(); function configureStore(initialState = fromJS({})) { const enhancers = [ autoRehydrate(), applyMiddleware(sagaMiddleware), ]; if (__DEV__) { enhancers.push(devTools()); } const store = createStore(createReducer(), initialState, compose(...enhancers)); sagas.forEach(saga => sagaMiddleware.run(saga)); persistStore(store, { storage: AsyncStorage }); return store; } module.exports = configureStore;
app/src/state/index.js
import { createStore, compose, applyMiddleware } from 'redux'; import { fromJS } from 'immutable'; import createSagaMiddleware from 'redux-saga'; import devTools from 'remote-redux-devtools'; import Parse from 'parse/react-native'; import { AsyncStorage } from 'react-native'; import { persistStore, autoRehydrate } from 'redux-persist-immutable'; import createReducer from './reducers'; import sagas from '../sagas'; import Settings from '../settings'; const settings = Settings.load(); Parse.initialize(settings.parseServerApplicationId); Parse.serverURL = settings.parseServerURL; const sagaMiddleware = createSagaMiddleware(); function configureStore(initialState = fromJS({})) { const enhancers = [ autoRehydrate(), applyMiddleware(sagaMiddleware), ]; if (__DEV__) { enhancers.push(devTools()); } const store = createStore(createReducer(), initialState, compose(...enhancers)); sagas.forEach(saga => sagaMiddleware.run(saga)); persistStore(store, { storage: AsyncStorage }); return store; } module.exports = configureStore;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the
app/src/state/index.js
file Add the following code:import { createStore, compose, applyMiddleware } from 'redux'; import { fromJS } from 'immutable'; import createSagaMiddleware from 'redux-saga'; import devTools from 'remote-redux-devtools'; import Parse from 'parse/react-native'; import { AsyncStorage } from 'react-native'; import { persistStore, autoRehydrate } from 'redux-persist-immutable'; import createReducer from './reducers'; import sagas from '../sagas'; import Settings from '../settings'; const settings = Settings.load(); Parse.initialize(settings.parseServerApplicationId); Parse.serverURL = settings.parseServerURL; const sagaMiddleware = createSagaMiddleware(); function configureStore(initialState = fromJS({})) { const enhancers = [ autoRehydrate(), applyMiddleware(sagaMiddleware), ]; if (__DEV__) { enhancers.push(devTools()); } const store = createStore(createReducer(), initialState, compose(...enhancers)); sagas.forEach(saga => sagaMiddleware.run(saga)); persistStore(store, { storage: AsyncStorage }); return store; } module.exports = configureStore;
The text was updated successfully, but these errors were encountered: