Files
cnapp/src/reduxStore.ts
T
nikolark fc8e6c9745 Fix last typescript strict issues
This uses the `any` escape hatch a few more places, which should be tidied up later.
Suggest upgrading redux usage to the latest version and start using slices to make a few things easier. Also the confetti component might be worth replacing

Remove dead code from the old membership charge flow++
2024-07-07 22:33:57 +02:00

22 lines
755 B
TypeScript

import AsyncStorage from '@react-native-async-storage/async-storage';
import { applyMiddleware, createStore } from 'redux';
import { persistStore, persistReducer } from 'redux-persist';
import thunk from 'redux-thunk';
import rootReducer from './reducers';
const persistConfig = {
key: 'root',
storage: AsyncStorage,
blacklist: ['isLoggingIn', 'isFetchingUserData', 'isRegisteringUser', 'loginError'],
};
const persistedReducer = persistReducer(persistConfig, rootReducer);
export const store = createStore(persistedReducer, applyMiddleware(...[thunk]));
export const persistor = persistStore(store);
export type AppStore = typeof store;
export type RootState = ReturnType<AppStore['getState']>;
export type AppDispatch = AppStore['dispatch'];