Skip to content

Failed to do dynamic loading with redux-router #284

@joeyzhao0113

Description

@joeyzhao0113

Version

2.1.2

Steps to reproduce

Create a router like below:

const rootRouter = {
    childRoutes:[{
      path:'/root',
      component:MainEntry,
      childRoutes: [
        require('../containers/main_entry')
      ]
    }]
  }

 return <Router history={hashHistory}>
    <ReduxRouter>
    {rootRouter}
   </ReduxRouter>
</Router>

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions