Skip to content

JEGardner/react-router-link

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-router-link

An updated Link component for react-router

This adds some extra properties to the default react-router Link component so that:

a) you can select whether to use push, replace or back history commands b) you can choose a different event to onClick

Examples

import { Link } from 'react-router-link'

Use replaceState so as not to alter history:

<Link to="/home" historyType="replace">Home</Link>

Use onTouchTap from react-tap-event-plugin instead of onClick

<Link to="/home" eventName="onTouchTap">Home</Link>

Go back to the previous location on the history stack:

<Link historyType="back">Back</Link>

About

An updated Link component for React-router

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%