還記得物件導向的寫法吧,把 state 加在 constructor 裡面,且因為 App 是繼承自 Component ,所以要記得加上 super() 去呼叫 Component 的 constructor ...
確定! 回上一頁