hi this page will explaine what i learned from react
1- first download react vite:
npm create vite@latest my-project -- --template react
2- install npm :
npm install
3- install tailwind :
npm install -D tailwindcss@3 postcss autoprefixer
npx tailwindcss init -p
4-put this code in css
@tailwind base;
@tailwind components;
@tailwind utilities;
5- and put this in tailwind setting
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
DONE!
for downloading some libraries we have to download these:
1-for using links and routers like:
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
we have to download this library :
npm install react-router-dom
Example Text File2-for write api fetching better and esealy we can use axios and for install this library we must write :
npm install axios
Example Text File3-for better management api like make : { data, isError, error, refetch, isFetching } we use queries for install them we must write :
npm install @tanstack/react-query
and we write that like this:
Example Text File