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