boulevard-react
v1.0.4
Published
[boulevard](https://github.com/quarterto/boulevard) as a hook, using [`useHistory`](https://github.com/quarterto/use-history)
Downloads
3
Readme
boulevard-react
boulevard as a hook, using useHistory
usage
npm install boulevard-react
const useRoutes = require('boulevard-react')
const routes = {
'/': () => <div>home</div>
'/page/:id': ({id}) => <div>page {id}</div>
}
const App = () => {
const {children} = useRoutes(routes)
return <div>{children}</div>
}