node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

react-router-path-normalize

react-router-path-normalize

Normalize paths for React Router.


Installation

npm i react-router-path-normalize

Usage

import { BrowserRouter } from 'react-router-dom'
import Normalize from 'react-router-path-normalize'
import { render } from 'react-dom'
import routes from './routes'
 
render(
  <BrowserRouter>
    <Normalize>
      <Routes />
    </Normalize>
  </BrowserRouter>,
  document.getElementById('root')
)

Normalize takes exactly one child.

License

MIT