API REFERENCE
Component
The Component React component is the main component provided by Rasengan.js to setting up all the routing system based on the AppRouter that it receives as a prop.
This component is used inside the main.tsx file (the entry point of the application) to set up the routing system.
TypeScript
JavaScript
tsximport { type AppProps } from "rasengan"; import AppRouter from "@/app/app.router"; export default function App({ Component, children }: AppProps) { return <Component router={AppRouter}>{children}</Component>; }
The Component component receives the router prop, which is the AppRouter class that contains all the routes of the application.
It will be responsible for setting up the routing system based on the routes defined in the AppRouter class.
The Component component accepts two props:
router: TheAppRouterclass that contains all the routes of the application.children: The children of theComponentcomponent, which represents all the routing system of the application.
Outlet Component
Template