Reach Router | React Routing made Easy

React Router vs. Reach Router (statistics as of Nov 4th 2018)
npm install @reach/router or yarn add @reach/router
import { Router } from "@reach/router"<Router>
<ComponentX path="your" /> // http://www.whatever.com/your
<ComponentY path="slug" /> // http://www.whatever.com/slug
<ComponentZ path="here" /> // http://www.whatever.com/here
...
</Router>
import { Link } from "@reach/router"<Link to="your">ComponentX</Link>
<Link to="slug">ComponentY</Link>
<Link to="here">ComponentZ</Link>
import { Router } from "@reach/router"<Router>
<ComponentA path="one"> // http://www.whatever.com/one
<ComponentB path="two"> // http://www.whatever.com/one/two
<ComponentC path="three"> // http://www.whatever.com/one/three
</ComponentA>
</Router>
import { Router } from "@reach/router"<Router>
<Item path="stuff/:stuffId" /> // http://www.whatever.com/stuff/1
</Router>

--

--

--

Full-Stack Web Developer | www.jordaneckowitz.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Setup Express + Typescript + Eslint + Webpack 5

Build a Desktop app with Gridsome and Electron.

How to Tame Your Frontend

10 JavaScript Problem Solving

Styling Native Google Maps in Ionic

How I Made A Youtube Search Engine on Google Sheets

ES6 for beginners Part-2

“this” in JS exercise

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jordan Eckowitz

Jordan Eckowitz

Full-Stack Web Developer | www.jordaneckowitz.com

More from Medium

Simple data fetching with custom React hooks and SWR

How to Create a Custom Next.js Link Component With Bootstrap Icon

Build a React app with webpack (Without Create React App)

Build a Simple React App with CRUD