📅  最后修改于: 2022-03-11 15:01:54.551000             🧑  作者: Mango
//initial state
const [state, setState] = useState(0)
//change state
setState(1)
//change state with prev state value
setState((prevState) => {prevState + 2}) // 3