Added gitignore
This commit is contained in:
24
vidow-front/src/app/store.ts
Normal file
24
vidow-front/src/app/store.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit'
|
||||
|
||||
import counterReducer from '../features/counter/counterSlice'
|
||||
|
||||
export function makeStore() {
|
||||
return configureStore({
|
||||
reducer: { counter: counterReducer },
|
||||
})
|
||||
}
|
||||
|
||||
const store = makeStore()
|
||||
|
||||
export type AppState = ReturnType<typeof store.getState>
|
||||
|
||||
export type AppDispatch = typeof store.dispatch
|
||||
|
||||
export type AppThunk<ReturnType = void> = ThunkAction<
|
||||
ReturnType,
|
||||
AppState,
|
||||
unknown,
|
||||
Action<string>
|
||||
>
|
||||
|
||||
export default store
|
Reference in New Issue
Block a user