Conceptual
Login

Redux Toolkit createSlice

`createSlice` takes a name, initial state, and an object of case reducers, and generates the action types, action creators, and Immer-wrapped reducer in one call. It is the standard way to write Redux logic today; hand-written switch reducers and action-type constants are legacy style.

This Concept is waiting for its first lesson!

`createSlice` takes a name, initial state, and an object of case reducers, and generates the action types, action creators, and Immer-wrapped reducer in one call. It is the standard way to write Redux logic today; hand-written switch reducers and action-type constants are legacy style.

Are you a teacher? Sign in to start contributing.

Sign In