Add support for flash messages utilizing redux
This commit is contained in:
parent
b93b40ba31
commit
435626f4b7
15 changed files with 268 additions and 34 deletions
14
resources/scripts/redux/configure.ts
Normal file
14
resources/scripts/redux/configure.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { createStore } from 'redux';
|
||||
import { persistStore, persistReducer, PersistConfig } from 'redux-persist';
|
||||
import storage from 'redux-persist/lib/storage';
|
||||
import { reducers } from './reducers';
|
||||
|
||||
const persistConfig: PersistConfig = {
|
||||
key: 'root',
|
||||
storage,
|
||||
};
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, reducers);
|
||||
|
||||
export const store = createStore(persistedReducer);
|
||||
export const persistor = persistStore(store);
|
Reference in a new issue