下面的计数器组件示例展示了 setState 的两种用法: ... case 'decrement': return {count: state.count - 1}; default: throw new Error(); } } function Counter() ...
確定! 回上一頁