mitschabaude / use-path

Minimal React navigation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use-path

import {useLocation, usePath, navigate} from 'use-location';

// in react component
useLocation(); // /users/1
usePath(); // ['users', '1']

// anywhere
navigate('/about'); // changes location and notifies hooks

About

Minimal React navigation

License:MIT License


Languages

Language:TypeScript 100.0%