🔮 Output PredictionRX React Hard⚡+35 XP
useReducer Action
What is the state after dispatching this action?
React
const reducer = (state, action) => {
switch(action.type) {
case "INCREMENT": return { count: state.count + 1 };
default: return state;
}
};
// state = { count: 5 }, dispatch({ type: "INCREMENT" })