configureStorebeginnerconst { configureStore, createSlice } = ReduxToolkit
const slice = createSlice({ name: 'n', initialState: 0, reducers: { inc: s => s + 1 } })
const store = configureStore({ reducer: slice.reducer })
store.dispatch(slice.actions.inc())
store.getState() // β 1configureStore wraps the Redux createStore with defaults β pass your slice reducer directly.
configureStore creates a Redux store with sensible defaults (Redux DevTools, thunk middleware). Pass a reducer option with either a single reducer or an object of slice reducers.
Challenge: Create a counter slice and a store using it as the sole reducer.
store.getState() // β 0
store.dispatch(counterSlice.actions.inc())
store.getState() // β 1