📌  相关文章
📜  反应使用状态功能更新 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:54.298000             🧑  作者: Mango

代码示例2
// declare state using useState hook.
// someState is set to someInitialState
const [someState, setSomeState] = useState(someInitialState);

// setSomeState updates the current state 
setSomeState(someOtherState);