我目前有这样的路由器设置
const App = () => {
return (
<BrowserRouter>
<Switch>
<Route exact path="/" component={FutureMeLandingPage} />
<Route path="/career-me" component={CareerMeRoutes} />
<Route path="/dashboard" component={StudentDashboard} />
<Route component={NotFoundPage} />
</Switch>
</BrowserRouter>
);
};
const CareerMeRoutes = ({ match }: RouteComponentProps) => (
<>
<Route exact path={match.path} component={CareerMeLandingPage} />
<Route path={`${match.path}/test`} component={CareerMeTestIntroPage} />
<Route path={`${match.path}/home`} component={CareerMeHomePage} />
<Route path={`${match.path}/subjects`} component={SubjectListPage} />
</>
);
当我在介绍页面 (/career-me/home) 时,是否可以导航到主题页面 (/career-me/subject) 而不必写“/career-me”?我觉得有点多余。