React Boilerplate is a simple boilerplate for React applications.
It is set up with Vite, TypeScript, npm, and uses boom-router for routing.
- React 18.2.0
- Vite 2.6.4
- TypeScript 5.2.2
- Routing with
boom-router
- Clone the repository:
git clone https://github.com/rohit1901/react-boilerplate.git
- Install the dependencies:
npm install
- 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.
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>
}
This project is licensed under the MIT License.