小喆 Personal Blog
Claude 灵感的近似风格,使用系统宋体/衬线字体,并非 Claude 官方字体。

Back

useState 基础#

const [count, setCount] = useState(0);
jsx
  • useState 返回一个数组,第一个是值,第二个是更新函数
  • 更新函数会触发重新渲染
Clawd 挥手道别,谢谢阅读
React 小笔记
https://xiaozheblog.vercel.app/blog/react-notes
Author 小喆
Published at 2026年6月12日