因此,React 提供了userEffect 這個內建的hook ... 範例:把「input 在 onChange 時會 setValue() 這整件事情」包成一個 useInput hook. 作法如下:
確定! 回上一頁