看了官方文檔,沒想明白是干什么的,和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>);
react-router4 Route中的children屬性作用是什么
胡子哥哥
2019-03-07 17:15:26