귀속 생 성 플러그 인 루트 (react - router 4.0 이하)
883 단어 react-router4.0 이하
function descRouter(routes) {
return routes.map((route, i) => {
if (route.routes) {
return (
{descRouter(route.routes)}
);
} else {
return ();
}
});
}
매개 변수 routes 의 구 조 는 다음 과 같 습 니 다.
[
{ path:'/',
component: 'InterfaceList',
routes: [
{ path: 'aaa',
component: 'UserList',
},
{ path: 'bbb',
component: 'ProfileList',
}
]
},
{
path:'/ABCList',
component: 'ABCList',
}
]
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
【초보자용】React-Redux로 ToDo 앱을 만들어 보았다다양한 기능을 추가해 보았습니다. · 로그인 기능 구현 또한 이번에는 React-Redux와 Hooks를 사용하여 구축을 해 보았습니다. 다음에 살려 가고 싶습니다! ~로그인 전~ SemanticUI의 아이콘으로 G...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.