Wednesday, October 25, 2023

Basic setup of react router

 1st react router setup

npm create vite@latest name-of-your-project -- --template react

npm install react-router-dom localforage match-sorter sort-by

2nd tailwind  setup

npm install -D tailwindcss postcss autoprefixer

npx tailwindcss init -p

3rd daisy ui

npm i -D daisyui@latest 

4th open code .

5th add tailwind extra settings

Go to tailwind.config.js and add this code

content: [

"./index.html",

"./src/**/*.{js,ts,jsx,tsx}",

],

2nd index.css add this code

@tailwind base;

@tailwind components;

@tailwind utilities;

6th: daisy ui extra settings

Go to tailwind.config.js and add this code

7th: fix that plugins: [require("daisyui")],

Go to .eslintrc.cjs file and add 


8th routers setup

1st create one folder Routes > file Routes and setup routes 

2nd in main.jsx












0 comments:

Post a Comment