Open joeyzhao0113 opened 7 years ago
I tried to use below code to put route
as the value for prop
in <ReduxRouter>
but it doesn't work. None of the router is recognised by react. I will get a blank page with this error [react-router] Location "/" did not match any routes
<Router history={hashHistory}>
<ReduxRouter prop={
<Route key="root" name="root" path="/root" component={MainEntry}>
<IndexRedirect to='/'/>
<Route path="/" component={MainComponent} onEnter={auth}/>
</Route>
}>
</ReduxRouter>
</Router>
Version
2.1.2
Steps to reproduce
Create a router like below:
but when loading the page, I got below error:
Objects are not valid as a React child (found: object with keys {childRoutes}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.
Expected Behavior
Actual Behavior