State Management · Junior · Question 26 of 75

What does createSlice generate?

Explanation

createSlice({ name: 'todos', initialState, reducers: { added(state, action) {...} } }) returns slice.reducer and slice.actions.added with the type 'todos/added'.

Further reading

Problem with a question

State Management · Junior · question 26

Test yourself

Take the State Management · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz