add redux and user slice

This commit is contained in:
2024-03-23 13:48:43 +01:00
parent 2c91f4355a
commit dbec452dbe
8 changed files with 149 additions and 43 deletions
+15
View File
@@ -0,0 +1,15 @@
import { configureStore } from "@reduxjs/toolkit"
import userReducer from './shared/domain-models/userSlice'
const store = configureStore({
reducer: {
user: userReducer
},
});
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
export default store