Skip to content

rohit1901/react-boilerplate

Repository files navigation

Boom Router — a minimalistic React router

React Boilerplate is a simple boilerplate for React applications.

It is set up with Vite, TypeScript, npm, and uses boom-router for routing.

Features

  • React 18.2.0
  • Vite 2.6.4
  • TypeScript 5.2.2
  • Routing with boom-router

Getting Started

  1. Clone the repository:
git clone https://github.com/rohit1901/react-boilerplate.git
  1. Install the dependencies:
npm install
  1. Start the development server:
npm run dev

This will start the development server and open your application in a web browser. Any changes you make to your code will automatically be reflected in the browser.

Routing

This boilerplate uses boom-router for routing. The routes are defined in the src/Routes.tsx file. Here is a basic example of how to define routes:

import {Route, Switch} from "boom-router";
import {About} from "./About.tsx";

export const Routes = () => {
    return <Switch>
        <Route path="/">Welcome!</Route>
        <Route path="/about" component={() => <About/>} />
        <Route path="/:anything*">
            <center>
                <b>404:</b> Route not found! <code>#fuck 🤔</code>
            </center>
        </Route>
    </Switch>
}

License

This project is licensed under the MIT License.

About

A simple boilerplate for React apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published