In Redux Toolkit, when you define reducers inside createSlice(), it automatically generates corresponding action creators for each reducer function. These action creators simplify dispatching actions without manually defining action types or creators.
createSlice() takes the slice name and reducer keys to generate unique action types like sliceName/reducerName.
It returns an object called actions that contains functions (action creators) for each reducer.
When called, an action creator returns an object with type and optional payload.