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

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

react,this.setState數(shù)據(jù)更新

react,this.setState數(shù)據(jù)更新

拉莫斯之舞 2018-07-23 09:35:18
這個方法中我更新currentType的值以后,在fetchQuestionIdList函數(shù)中用currentType作為參數(shù)去調(diào)接口,但是每次currentType都是我上次更新的值,選2傳送1,選3傳送2,選4傳送3....有什么方法解決這種延遲?或者我跟本不應(yīng)該這樣用它作為參數(shù),而是定義別的變量保存我選的值?this.setState只是用來重新渲染嗎? onClickItemType=(item)=>{     this.setState({        currentType:{            code:item.code,            name:item.name         },        isShowTypeList: false     })     this.fetchQuestionIdList(this.state.navigationCode)}fetchQuestionIdList = async (tfcode) => {     let params = {        navigationCode: tfcode,        typeCode: currentType.code,        diffCode: currentDiff.code,        contentFinalFlag: true,        thirdpartyType: 1     }     let systemQuestions = await matchExcerciseApi.getQuestionList(params) || {}}
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1516 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號