Unitools | <Link /> | By GeekyAnts
This document provides a comprehensive guide on configuring & using the official @unitools/link
package. This configuration is tailored for Expo and Next.js applications, enabling seamless link usage across both frameworks.
For Next.js
Install @unitools/link
and @unitools/link-next
.
Add module resolver to your next.config.js
file.
For Expo
Install @unitools/link
and @unitools/link-expo
.
Add module resolver to your babel.config.js
file.
Usage
Props
Name | Type | Default | Description |
---|---|---|---|
href | string | - | The URL the link points to. |
children | ReactNode | - | The content of the link. |
asChild | boolean | false | If true, the link will be rendered as a child component. |
push | boolean | false | If true, the link will push the new URL to the history stack. |
replace | boolean | false | If true, the link will replace the current URL in the history stack. |