修改状态的值. 延用上述代码中的setCount,修改状态有两种方式。用法如下:. // 用法一setCount((count) => { return count + 1 }) // 用法二setCount(0).
確定! 回上一頁