Back to Ionic Framework

Ionic React Router

docs/react-router/README.md

9.0.01.1 KB
Original Source

Ionic React Router

The @ionic/react-router package is the routing integration for @ionic/react. It uses the React Router library beneath the surface.

Contributing

See our Contributing Guide.

Testing

Refer to the React Router Testing documentation for testing the React Router package.

Debug Logging

The StackManager logs the decisions behind the swipe-to-go-back gesture: whether it can start, which views are entering and leaving, and whether the entering page ends up visible. These logs are off in every build, dev included. Ionic's logLevel config turns them on, either through the URL:

http://localhost:3000/routing?ionic:logLevel=DEBUG

or before the app renders:

tsx
import { LogLevel, setupIonicReact } from '@ionic/react';

setupIonicReact({ logLevel: LogLevel.DEBUG });

Refer to the testing docs for how to read them in a failing e2e run.