Rasengan Logo
Rasengan Logo
  • Docs
  • Blog
  • Showcase
  • Support us
Using stable versionv1.2.0
Documentation
Packages
Templates
Rasengan UI Kit
Using stable versionv1.2.0
Documentation
Packages
Templates
Rasengan UI Kit

API REFERENCE

Link Component

The <Link> component is a React component that allows you to navigate between routes in your application. It is the recommended way to navigate between routes in Rasengan.js.

Usage

to Property

Here's an example of how to use the <Link> component:

TypeScript
JavaScript
src/app/home.page.tsx
tsximport React from "react"; import { PageComponent, Link } from "rasengan"; const Home: PageComponent = () => { return ( <div> <h1>Home</h1> <Link to="/dashboard">Go to Dashboard</Link> </div> ); }; Home.path = "/"; Home.metadata = { title: "Home", description: "Home Page", }; export default Home;

Passing data via (state) prop

TypeScript
JavaScript
src/app/home.page.tsx
tsximport React from "react"; import { PageComponent, Link } from "rasengan"; const Home: PageComponent = () => { return ( <div> <h1>Home</h1> <Link to="/dashboard" state={{ name: "hello" }}>Go to Dashboard</Link> </div> ); }; Home.path = "/"; Home.metadata = { title: "Home", description: "Home Page", }; export default Home;

Then, you can access to the state like follow:

JS
jsconst { state } = useLocation();

Properties

PropsTypeDescription
tostringThe path to navigate to
stateanyData sent via URL to the destination page
Deploying: Node Server
NavLink Component

ON THIS PAGE

Usage
to Property
Passing data via (state) prop
Properties
Rasengan Logo
Rasengan Logo

Resources

  • Docs
  • Packages
  • Blog
  • Showcase
  • Support us

Community

  • Github
  • X (Twitter)

Subscribe to the Newsletter

Stay informed to the news about rasengan.js including new releases, events, etc...

© 2024-2026 Rasengan Labs, All rights reserved.