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