TA貢獻1853條經驗 獲得超9個贊
可以在子組件添加一個componentWillRecieveProps周期,在里面獲取到即將接收的props。如下: componentWillReceiveProps(nextProps) { this.setState({ A: nextProps.A }); }
剖析 React 內部運行機制
¥ 58.00
舉報
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號