react redux usereducer code example Example: usereducer react const [state, dispatch] = useReducer(reducer, initialArg, init);