Skip to content

Instantly share code, notes, and snippets.

@chuyihuang
Created September 12, 2017 11:51
Show Gist options
  • Save chuyihuang/2fafec0f03a5fcd14a6f856ab9c378e5 to your computer and use it in GitHub Desktop.
Save chuyihuang/2fafec0f03a5fcd14a6f856ab9c378e5 to your computer and use it in GitHub Desktop.
week_4_demo_3
import {createStore, applyMiddleware, compose} from 'redux';
import thunk from 'redux-thunk';
import indexReducer from './reducers/index';
import {persistStore, autoRehydrate} from 'redux-persist';
import {AsyncStorage} from 'react-native';
const store = compose(applyMiddleware(thunk), autoRehydrate())(createStore)(indexReducer)
persistStore(store, {blacklist: [], storage: AsyncStorage});
export default store;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment