πŸ§‘πŸΎβ€πŸ’» prep

Codealong to explore the basic principles of React

Vite

Learning Objectives

Vite is a build tool. It is the default build tool for Vue, SvelteKit, Preact and Solid. It is a common build tool for React and we will use it in this course.

In your terminal, run:

npm create vite@latest

And choose these options:

# Project name (you will need to type this):
react-vite
# Select a framework (use the Up/Down arrow keys to navigate):
React
# Select a variant (use the Up/Down arrow keys to navigate):
JavaScript + SWC

Change into the new directory and start the development server:

cd react-vite
npm install
npm run dev

πŸ’‘ tip

The default build tool for React used to be create-react-app. This is no longer maintained or recommended by the React team. It is still used in many tutorials and examples, but it is not the best way to start a new React project nowadays.