@unitools/router-expo
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

@unitools/link [ALPHA]

This is the official documentation of the @unitools/link package.

For Next.js

Installation

npm install @unitools/link

or

yarn add @unitools/link

Add module resolver to your next.config.js file.

// next.config.js

module.exports = {
  webpack(config) {
    config.resolve.alias["@unitools/link"] = "next/link";
    return config;
  },
};

For Expo

Installation

Install @unitools/link and the peer dependency @react-navigation/native.

npm install @unitools/link @react-navigation/native

or

yarn add @unitools/link @react-navigation/native

Usage

import Link from "@unitools/link";

export default function Home() {
  return (
    <View>
      <Link href="/about">
        <Text>About</Text>
      </Link>
    </View>
  );
}

Props

Prop Type Default Description status Support Status
href String or Object href url required
replace Boolean Replace the current history state -
scroll Boolean - -
prefetch Boolean If true, this will prefetch the url -
passHref Boolean Forces Link to send the href property to its child -
shallow Boolean - -
locale Boolean If true, the active locale is automatically -

Readme

Keywords

none

Package Sidebar

Install

npm i @unitools/router-expo

Weekly Downloads

232

Version

0.0.5

License

none

Unpacked Size

9.13 kB

Total Files

23

Last publish

Collaborators

  • sravankumarvelangi
  • atulrpandey
  • meenumakkar
  • surajahmedc
  • ankit-tailor
  • rayan1810