Skip to content

humaans/react-space-router

Repository files navigation

react space router logo, a skeleton floating in space with a react logo for the head

React Space Router

Space Router bindings for React


React Space Router is a set of hooks and components for keeping your app in sync with the url and performing page navigations. A library built by and used at Humaans.

  • React hooks based
  • Nested routes
  • Async navigation middleware
  • Built in query string parser
  • Supports external stores for router state
  • Scrolls to top after navigation
  • Preserves cmd/ctrl/alt/shift click and mouse middle click

Why

"Perfection is achieved when there is nothing left to take away." React Space Router is built upon Space Router, a framework agnostic tiny core that handles url listening, route matching and navigation. React Space Router wraps that core into an idiomatic set of React components and hooks. The hope is you'll find React Space Router refreshingly simple compared to the existing alternatives, while still offering enough extensibility.

Install

$ npm install react-space-router

API

See the API Docs for more details.