第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用react-redux打印的執(zhí)行順序

使用react-redux打印的執(zhí)行順序

阿晨1998 2018-11-07 14:31:40
為何打印出來的順序是31232?是不是我寫的不對?class Home extends Component {    constructor(props) {        super(props);        console.log(1)        this.props.actions.fetchTopics({type: 'excellent'})    }    render() {        console.log(2)        return (            <div>                xxx            </div>        );    }}const mapStateToProps = state => {    console.log(3)        const { postsByReddit } = state    let topics = [],        results = postsByReddit['results']            if (results)  topics = results.topics        return {        topics    }}export default connect(    mapStateToProps,    mapDispatchToProps)(Home);
查看完整描述

1 回答

?
慕俠2389804

TA貢獻1719條經驗 獲得超6個贊

31232分為兩部分
一、312 第一次渲染組件props——>constructor——>render 
二、32 組件更新props——>render

查看完整回答
反對 回復 2018-12-18
  • 1 回答
  • 0 關注
  • 653 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號