API REFERENCE
Page Convention naming
In Rasengan.js, to create a page
, you have to create a file that follow the following name pattern:
txt[name].page.jsx
A page
is UI that is unique to a route.
TypeScript
JavaScript
tsximport { PageComponent } from "rasengan"; /* * This Home Page is located inside the home.page.tsx file */ const Home: pageComponent = () => { return ( <div> <h1>Home Page</h1> </div> ) } Home.path = "/"; Home.metadata = { title: "Home", description: "This is the home page", } export default Home;
Based on the convention, we have juste replace the [name]
by home
in the convention name and we got home.page.jsx
.
[name].layout.tsx
[name].router.tsx