state={
newAddress: this.props.address,
}------------------------------------------------------------------------------------------------- constructor(props){ super(props); this.state={
newAddress: this.props.address,
}
}關于上面兩種寫法,是否結果是第一種newAddress能取到值,而第二種值會是undefined。
添加回答
舉報
0/150
提交
取消