Closed HriBB closed 8 years ago
Hey @HriBB is this still an issue?
@Scarysize with this version, this is not an issue anymore. I think you can close this one.
Just for the reference, if anyone hits the same problem, here's a simple workaround.
const routes = [
{ path: '/', component: HomeContainer },
{ path: 'login', component: LoginContainer },
{ path: 'map', component: MapContainer },
{ path: 'about', component: AboutContainer },
{ path: 'type/:type', component: TypeContainer },
/* ... */
];
/*
return [{
component: AppContainer,
childRoutes: routes
}];
*/
// redux-router expects PropTypes.node in production
// therefore we need to return route node
return (
<Route component={AppContainer} childRoutes={routes} />
);
@HriBB thanks for the quick response!
Hello
I'm using redux-router@1.0.0-beta7 and I get this error on the server, although page renders correctly and everything works fine. Warning: Failed propType: Invalid prop
children
supplied toReduxRouter
, expected a ReactNode.This is my code.
The problem is that my getRoutes() function returns an array instead of an JSX and has PropTypes.node
If I change my getRoutes() to return jsx, everything works fine.