Put in order · JavaScript and React course · Module 4: Context API and useReducer
Switch Structure in Reducer
Arrange the case syntax elements in a reducer from left to right:
Items to put in order
- return
- :
- { ...state, count: state.count + 1 }
- 'INCREMENT'
- case
You can check the correct answer by solving this task in the CodeWorlds game.