use-path
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i use-path

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

2.84 kB

Total Files

5

Last publish

Collaborators

  • mitschabaude