To_start_a_React_app_with_Vite_Tailwind_CSS_React_Router_and_Redux_Toolkit
To_start_a_React_app_with_Vite_Tailwind_CSS_React_Router_and_Redux_Toolkit
1. Tailwind CSS
Configure the tailwind.config.js:
To start a React app with Vite, Tailwind CSS, React Router and Redux Toolkit 1
plugins: [],
}
2. react-router-dom
ReactDOM.createRoot(document.getElementById('root')).rende
r(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);
function App() {
return (
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
</Routes>
To start a React app with Vite, Tailwind CSS, React Router and Redux Toolkit 2
);
}
function Home() {
return <h1 className="text-2xl font-bold">Home Page</h1
>;
}
function About() {
return <h1 className="text-2xl font-bold">About Page</h1
>;
}
To start a React app with Vite, Tailwind CSS, React Router and Redux Toolkit 3