React Hooks 是 React 16.8 的新增特性。它可以让你在不编写 class 的情况下使用 state 以及其他的 React 特性。
useState 是最常用的 Hook,用于在函数组件中添加状态。
const [count, setCount] = useState(0);