File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -126,17 +126,19 @@ import { configureStore } from "@reduxjs/toolkit";
126126// highlight-next-line
127127import counterReducer from " ./features/counter/counter-slice" ;
128128
129- // Infer the `RootState` and `AppDispatch` types from the store itself
130- export type RootState = ReturnType < typeof store .getState > ;
131- // Inferred type: {counter: CounterState}
132- export type AppDispatch = typeof store .dispatch ;
133-
134- export default configureStore ({
129+ const store = configureStore ({
135130 reducer: {
136131 // highlight-next-line
137132 counter: counterReducer,
138133 },
139134});
135+
136+ // Infer the `RootState` and `AppDispatch` types from the store itself
137+ export type RootState = ReturnType < typeof store .getState > ;
138+ // Inferred type: {counter: CounterState}
139+ export type AppDispatch = typeof store .dispatch ;
140+
141+ export default store ;
140142```
141143
142144### Use Redux State and Actions in Angular Components
You can’t perform that action at this time.
0 commit comments