React屬性與事件

1、State屬性 state 屬性對模塊來講屬於自身屬性 初始化 state react中每一個類都有一個構造函數 constructor(),初始化可放在構造函數中,經過 JSon 語法初始化 state constructor(){ super(); //調用基類全部的初始化方法 this.state = {username : "Jaakko"}; } 修改 state 修改 state
相關文章
相關標籤/搜索