Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

link-react

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-react

A generalized link component that allows client-side navigation while taking into account exceptions.

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
248
increased by82.35%
Maintainers
1
Weekly downloads
 
Created
Source

A generalized link <a> component that allows client-side navigation, while ignoring:

  • shift-clicking
  • alt-clicking
  • ctrl-clicking
  • non-left clicking
  • target attribute
  • mailto href

Install

npm install link-react --save

React itself is a peer dependency and not included, it is the responsibility of the implementing app to provide a reference to React.

Use

import React from 'react';
import Link from 'link-react';

export default (p) => (
	<nav>
		<Link href={ p.homeLink.href } onClick={ p.homeLink.onClick }>{ p.homeLink.label }</Link>
		<Link href={ p.aboutLink.href } onClick={ p.aboutLink.onClick }>{ p.aboutLink.label }</Link>
	</nav>
);

License

Released under an MIT license.

  • state-driven routing: Full-featured, dependency-free, dsl-free, state-driven routing.

Other

Like it? Star It

Keywords

FAQs

Package last updated on 22 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc