Link
Navigates user to provided route on click. Has similar props with <a> element but instead of href has route and params props.
route
type: Route<T>required: yes
params
type:Trequired: if route has params:yesotherwise:no
query
type: Queryrequired: no
replace
type: booleanrequired: no
Example
tsx
import { Link } from '@argon-router/react';
import { routes } from '@shared/routing';
function Profile({ user }) {
return (
<>
<Link to={routes.settings}>Settings</Link>
{user.posts.map((post) => (
<Link to={routes.editPost} params={{ id: post.id }}>
Edit post
</Link>
))}
</>
);
}