prefer arrow functions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
15
src/store.ts
15
src/store.ts
@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user