-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
The redirect here will not work
export const routes:ReactRouter.Route = (
<ReactRouter.Route path="/" component={topNav.TopNavbar}>
<ReactRouter.Route path="comments" component={cbox.CommentBox}/>
<ReactRouter.Route path="comments2" component={redditView}/>
<ReactRouter.Redirect from="/comments" to="/comments2" />
</ReactRouter.Route>
);
However, if placed above the comments
route, it will
export const routes:ReactRouter.Route = (
<ReactRouter.Route path="/" component={topNav.TopNavbar}>
<ReactRouter.Redirect from="/comments" to="/comments2" />
<ReactRouter.Route path="comments" component={cbox.CommentBox}/>
<ReactRouter.Route path="comments2" component={redditView}/>
</ReactRouter.Route>
);
This goes against the documentation which says that the redirect can be put anywhere.
Also this means there is no place to put a redirect on the '/`, since there is no higher level element to place it on. This is demonstrated in #1920.
Metadata
Metadata
Assignees
Labels
No labels