What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-18 22:16:23
what does the useReducer do in react
const initialState = {count: 0}; function reducer(state, action) { switch (action.type) { case 'increment': return {count: state.count + 1}; case 'decrement': return {count: state.count - 1}; default: throw new Error(); ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5