
What React (Vite) is good at
- +Maximum flexibility
- +Huge ecosystem
- +Fast dev server
- −No built-in SSR
- −You wire up routing, data fetching
Coding-agent prompt
Drop into Claude / Cursor to get idiomatic React (Vite) code.
You're writing a React + Vite app. Follow these rules: - Functional components with hooks only — no class components. - Co-locate state with the component that owns it; only lift when it's genuinely shared. - Reach for context *only* for cross-cutting concerns (theme, auth). Prop-drill a level or two before context. - Use `react-router-dom` for routing; a single `RouterProvider` with a typed route tree. - TanStack Query (react-query) for server state. Never useEffect + useState for fetching. - Strict TypeScript — types on every component prop, no implicit any. - Keep effects small and explain every dependency. If you're using a ref to escape React, comment why.
Beginner's guide to React (Vite)
In one line: React is the library that draws your UI; Vite is the tool that runs it on your computer.
React is a JavaScript library for building user interfaces out of small pieces called components — a button, a card, a form. Vite is the tool that bundles your code and serves it in the browser while you work. Together they give you the fastest way to start building a single-page app (SPA) without a framework's opinions.
React is LEGO bricks. Vite is the table you build them on.
npm create vite@latest my-app -- --template react-tsCreates a new React + TypeScript project named my-app.
cd my-app && npm installDownload the packages it needs.
npm run devStart the dev server, usually http://localhost:5173.
Popular pairings with React (Vite)
CapacitorFrontendCapacitor lists React (Vite) as a supported pairing.
Headless UIStyling / UI & AnimationHeadless UI lists React (Vite) as a supported pairing.
HeroUIStyling / UI & AnimationHeroUI lists React (Vite) as a supported pairing.
AriakitStyling / UI & AnimationAriakit lists React (Vite) as a supported pairing.
Framer MotionStyling / UI & AnimationFramer Motion lists React (Vite) as a supported pairing.
- react-springStyling / UI & Animation
react-spring lists React (Vite) as a supported pairing.
Lottie (lottie-react)Styling / UI & AnimationLottie (lottie-react) lists React (Vite) as a supported pairing.
React Three FiberStyling / UI & AnimationReact Three Fiber lists React (Vite) as a supported pairing.