Giới thiệu
Authentication (xác thực) là phần thiết yếu trong hầu hết các ứng dụng web – giúp kiểm soát ai có quyền truy cập vào nội dung gì. Trong bài này, mình sẽ hướng dẫn bạn cách triển khai hệ thống xác thực đơn giản trong React
Setup Tailwind + Flowbite vào dự án React
Gõ lệnh sau để tạo Project react-auth-app
npm create vite@latest
> npx
> create-vite
│
◇ Project name:
│ react-auth-app
│
◇ Select a framework:
│ React
│
◇ Select a variant:
│ TypeScript + SWC
│
◇ Scaffolding project in D:\Practices\ReactJs\react-auth-app...
│
└ Done. Now run:
cd react-auth-app
npm install
npm run dev
> cd react-auth-app
> npm install
> npm install tailwindcss
> npm install tailwindcss @tailwindcss/vite
> npm install flowbite flowbite-reactNếu bạn sử dụng Tailwind 4 với Flowbite React thì cài đặt package sau:
npx flowbite-react@latest init
Nhận xét
Đăng nhận xét