@bsonntag/router
v0.2.0
Published
A router implementation with React Hooks.
Downloads
9
Maintainers
Readme
@bsonntag/router
A router implementation using React Hooks.
Usage
import { Route, Router, Switch } from '@bsonntag/router';
import About from './about';
import Home from './home';
import React from 'react';
function App() {
return (
<Router>
<Switch>
<Route path={'/'}>
<Home />
</Route>
<Route path={'/about'}>
<About />
</Route>
<Redirect to={'/'} />
</Switch>
</Router>
);
}
Documentation
Read the docs.
Contributing
Please feel free to submit any issues or pull requests.
License
MIT