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

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

react-router4 Route中的children屬性作用是什么

react-router4 Route中的children屬性作用是什么

胡子哥哥 2019-03-07 17:15:26
看了官方文檔,沒想明白是干什么的,和Route的render屬性有什么區(qū)別?const OldSchoolMenuLink = ({ label, to, activeOnlyWhenExact }) => (    <Route path={to} exact={activeOnlyWhenExact} children={({match}) => (        <div className={match ? 'active' : ''}>            {match ? '>' : ''}<Link to={to}>{label}</Link>        </div>    )}></Route>);
查看完整描述

2 回答

?
MMMHUHU

TA貢獻(xiàn)1834條經(jīng)驗(yàn) 獲得超8個贊

找到官方解釋了

Sometimes you need to render whether the path matches the location or not. In these cases, you can use the function children prop. It works exactly like render except that it gets called whether there is a match or not.


查看完整回答
反對 回復(fù) 2019-03-28
  • 2 回答
  • 0 關(guān)注
  • 583 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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