Skip to content

addRoute does not add new routes as children #600

@antony-k1208

Description

@antony-k1208

Version

4.0.0-rc.3

Reproduction link

https://codesandbox.io/s/bitter-dew-ie45g?file=/src/router/index.ts

Steps to reproduce

Check the link and open the console to see the output of all registered routes. Check the last object's children.

What is expected?

All dynamically added routes should be added to the Preview's route children array. Since I am adding them to that exact route.

What is actually happening?

Preview-First and Preview-Second are not getting added as child but as root routes with the path pointing to the correct location.

The children array of Preview does contain only the one added in the beginning via the routes array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThis problem still needs more feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions