React is a library. It lets you put components together, but it doesn’t prescribe how to do routing and data fetching.
To build an entire app with React, we recommend a full-stack React framework like Next.js or Remix.
Command line
# create a new project (framework: React, variant: TypeScript)
npm create vite@latest
# install the packages
npm install
# run the project
npm run dev
Basic App
public/index.html
<body><!-- hosts the React application --><divid="root"></div><scripttype="module"src="/src/main.tsx"></script></body>