React第 3 章|Hooks(各種use...)3.1 - Hooks是什麼On this pageHooks是什麼1. Hooks 是什麼 📌 概念 Hooks 是 React 提供的一種功能,讓你在「function component」中使用: state(狀態) 生命週期(像 mounted、更新) 📌 重點 只能在 React function component 中使用 不能寫在 if、for 裡面(要寫在最外層)