Please be aware, that nowadays (no matter if with or without React), you wouldn't write any of this any more in a production app.
Store creation nowadays works with configureStore, which conveniently combines createStore, combineReducers, applyMiddleware and compose.
Reducers are nowadays written with createSlice, which removes switch..case statements, immutable reducer logic and ACTION_TYPE constants from the picture.
Hi, Redux maintainer here.
Please be aware, that nowadays (no matter if with or without React), you wouldn't write any of this any more in a production app.
Store creation nowadays works with
configureStore
, which conveniently combinescreateStore
,combineReducers
,applyMiddleware
andcompose
.Reducers are nowadays written with
createSlice
, which removes switch..case statements, immutable reducer logic and ACTION_TYPE constants from the picture.Please give Why Redux Toolkit is How To Use Redux Today a read.