Links allow user to navigate to another in-app page or external URLs.
When navigating to a page in an application powered by React Router, Link
component from React Router is used instead of <a>
tag to avoid a full page reload.
Note that you still set path via a href
prop, not to
, as you would when using React Router's Link
component directly.
When an absolute URL is provided, it's treated as an external link. External links open in a new tab.
Name | Default | Description |
---|---|---|
href | — | string Link URL. |
children | — | ReactNode Link text. |
as | — | ElementType Element type to render as. |
isExternal | — | boolean If true, the link will open in new tab |