Skip to content

Warning #1: RouteGroup.open() cannot navigate

You called group.open(), but the group has no idea where to go.

What happened

groupRoutes tries, in order:

  1. Open the index route (index: true or second constructor arg)
  2. Else delegate to the first nested RouteGroup that itself can navigate (canNavigate === true)
  3. Else log this warning and skip navigation

Typical mistake: a group of routes without marking which one is the default landing page, and no nested group can navigate either.

Fix

Add an index child:

ts
groupRoutes({
  index: createRoute('/dashboard', { index: true }),
  settings: createRoute('/dashboard/settings'),
});

Or pass the index explicitly: groupRoutes(routes, myIndexRoute).

In production the message is minified (minified warning #1).

Released under the MIT License.