Created
October 24, 2022 09:05
-
-
Save victorbruce/61177690c48b84b8535396c148db727e to your computer and use it in GitHub Desktop.
Configuring a Redux store.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configureStore } from "@reduxjs/toolkit" | |
export const store = configureStore({ | |
reducer: { | |
// reference reducers here | |
} | |
}) | |
// create types for state and dispatch | |
export type RootState = ReturnType<typeof store.getState> | |
export type AppDispatch = typeof store.dispatch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment