看了官方文档,没想明白是干什么的,和Route的render属性有什么区别?
const OldSchoolMenuLink = ({ label, to, activeOnlyWhenExact }) => (
<Route path={to} exact={activeOnlyWhenExact} children={({match}) => (
<div className={match ? 'active' : ''}>
{match ? '>' : ''}<Link to={to}>{label}</Link>
</div>
)}></Route>
);
MMMHUHU
相关分类