prefer arrow functions

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-12 15:24:15 +02:00
parent afa677a375
commit cb7976bd3d
11 changed files with 134 additions and 121 deletions

View File

@ -7,7 +7,7 @@ import appReducer from './reducers';
import type { AnyAction } from 'redux';
export const store = configureStore({
const store = configureStore({
reducer: appReducer,
middleware: () => new Tuple(
thunk,
@ -17,9 +17,16 @@ export const store = configureStore({
devTools: true,
});
export type Store = typeof store;
type Store = typeof store;
// Infer the `RootState` and `AppDispatch` types from the store itself
// https://redux.js.org/usage/usage-with-typescript
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = ThunkDispatch<RootState, {}, AnyAction>;
type RootState = ReturnType<typeof store.getState>;
type AppDispatch = ThunkDispatch<RootState, {}, AnyAction>;
export {
store,
type Store,
type RootState,
type AppDispatch,
};