ionic-team / ionic-team/ionic-docs

React routing docs provide conflicting information on nested navigation

Open
#1,604 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
MDX
Stars
621
Forks
3.2k
Avg merge
1d 2h
Merged PRs (30d)
86

Description

**URL**
https://ionicframework.com/docs/react/navigation

The React Navigation document contains a small bit of conflicting information (which caused me some confusion).

The docs first showcase an example of nested routing using `IonRouterOutlet`:
```jsx








```
with the `DashboardPage` component further down:
```jsx
const DashboardPage: React.FC = () => {
return (




);
};
```

So upon navigating to the `/dashboard` routes, we'd expect the `DashboardPage` component to work and allow for nested navigation.

However, this does **not** work properly. Indeed, the docs also say [below](https://ionicframework.com/docs/react/navigation#ionrouteroutlet):

> An `IonRouterOutlet` should also not be a descendant from another `IonRouterOutlet`.

In direct contradiction with what was showcased a few paragraphs above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.