This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@routo/link
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

routo

@routo/link

npm npm bundle size coverage license

React Link component for @routo/core

Install

yarn add @routo/core @routo/react @routo/link

Usage

The Link component must have access to the router context, see @routo/react for details.

import { Link } from '@routo/link';

const Home = () => (
  <Link to="router/POST" params={{ id: '42' }}>
    Post #42
  </Link>
);

Props

Name Type Default Description
to * string Route ID.
params object
queryParams object
action 'push' | 'replace' 'push'
children node The content of the link.
className string Applied to the root element.
activeClassName string Applied to the root element when current url opened.
component elementType 'a' The component used for the root node. Either a string to use a DOM element or a component.
onClick function Called after updating the current route.

License

MIT © Timofey Dergachev

Readme

Keywords

Package Sidebar

Install

npm i @routo/link

Weekly Downloads

6

Version

0.8.0

License

MIT

Unpacked Size

11.6 kB

Total Files

11

Last publish

Collaborators

  • exeto