useReducer 返回一個包含2個元素的數組,類似於useState hook。 ... const [sum, dispatch] = useReducer((state, action) => { return state + action } ...
確定! 回上一頁