Docs
Provider
Provider
Main component that provides all router functionality
Props
Prop | Type | Description | Default Value |
---|---|---|---|
routes | RouteWithComponent[] | Array of route objects from config | [] |
Example
You can directly pass provider to app.tsx
Or create a separate component and use it as shown above
Even tho we recommend using file based routing with CLI you can do something like following