0.1.0 • Published 6 months ago

simple-router-react v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Simple Router React

A lightweight routing solution for React applications.

Installation

npm install simple-router-react

Usage

import { Router, Route, Link } from "simple-router-react";

const Home = () => <h1>Home Page</h1>;
const About = () => <h1>About Page</h1>;

const App = () => {
  return (
    <Router>
      <nav>
        <Link to="/">Home</Link>
        <Link to="/about">About</Link>
      </nav>

      <Route path="/" component={Home} />
      <Route path="/about" component={About} />
    </Router>
  );
};

export default App;
0.1.0

6 months ago