All Guides

React Projekt erstellen

Erstellen Sie ein modernes React-Projekt mit Vite.

Beginner10 Min.

Setup Steps

1. Create a React project with Vite:

npm create vite@latest project-name -- --template react-ts

2. Navigate and install dependencies:

cd project-name
npm install

3. Start the development server:

npm run dev

4. Add Tailwind CSS:

npm install -D tailwindcss @tailwindcss/vite

5. Add Tailwind plugin to vite.config.ts

6. Add to src/index.css:

@import "tailwindcss";

7. Add React Router:

npm install react-router-dom

8. Basic component structure:

src/
  components/
  pages/
  hooks/
  lib/
  App.tsx
  main.tsx

9. Production build:

npm run build

10. Build output is in the dist/ directory