Dynamic child route with empty path not working

Hi, using vue-router-next, why these two code snippets are not equivalent ?

In App.vue and Test.vue there is a router-view

In the first code snippet http://localhost/ with empty path correctly render the component B but in the second one it doesn’t work

(this problem only occurs when using a nested empty path while adding the child route dynamically, thus with a non empty path it works)

unknown
Here’s a playground

Hi, I suggest you delete the route you want to replace first, then add a new one.

router.removeRoute('Root');
router.addRoute('Root', {
  path: '',
  component: B
});

Hi, thanks for you answer. Your proposition means that the new route will replace the Root route. Or I want the new route to be a children of the Root route.

So with your solution when I navigate to http://localhost the component B will be rendered in the App.vue’s router-view but I need Test.vue to be rendered here and then the component B.vue rendered in Test.vue’s router-view.

Shoud I create an issue on the vue-router-next github repository ?