Difference between Reducer vs Extra Reducers
Copy Below Code
View As A Text File
Show Text Only
Show API
Edit Code
extrareducers is actually like reducers with enhancements, but it's been built to handle more options, esecially other actions (like the ones generated in other slices or actions made by createAction or createAsyncThunk). In one word
Everything you can dispatch in redux can be added to it.
The extrareducers property in createSlice can be used as a function or as an object.