Skip to content

Deeply nested IndexRoutes #2334

@maxim-grishaev

Description

@maxim-grishaev

There is a config example:
Router.jsx:

import moreRoutes from './MoreRoutes.jsx';
let cfg = (
        <Router history={history}>
            <Route path='/' component={ApplicationLayout}>
                {/*...*/}
                <Route {...moreRoutes.props} path='more'>
                    {moreRoutes.props.children}
                </Route>
            </Route>
        </Router>
    );

MoreRoutes.jsx:

export default (
    <IndexRoute component={MoreLayout}>
        <IndexRoute some='stuff'>
            <IndexRoute component={Fuuu} />
            <Route component={BlaBla} path='bla-bla' />
        </IndexRoute>
    </IndexRoute>
);

Being on /more I don't see Fuuu component as props.children in MoreLayout.
Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions