0.2.0 • Published 6 years ago

@bsonntag/router v0.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

@bsonntag/router

CircleCI

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