{
path: "/",
component: Layout,
// indexRedirect:{to:"/main"},
indexRoute: { onEnter: (nextState, replace) => replace("/main") },
childRoutes: [
Main,
LoginPage,
NotFound,
],
}
the indexRedirect: {to:"/main"} written in the above note is invalid (is it wrong)
switch to indexRoute can jump normally
version: react-router v2.3.0