React is one of the most popular front-end frameworks, even in 2025. So, what's the best way to install a React application?
Installing React with Vite
The simplest way today is to use Vite. You'll need to have NodeJS installed on your machine, and then you can run the following command:
npm create vite@latest
This will give you a prompt that looks like the following:
The first prompt will ask you which folder you want to install your new React application in. Then, it will prompt you which framework you want to use. Select React.
Next, you'll see another prompt that asks you which variant of React you want to use:
- TypeScript
- TypeScript + SWC
- JavaScript
- JavaScript + SWC
- React Router v7
If you are more familiar with Javascript, select the Javascript version. Otherwise, choose Typescript if you want to use Typescript. The SWC stands for Speedy Web Compiler, a new and faster compiler built in Rust. It's up to you if you want to use it. Select the variant you wish to use.
In this case, I'm going to select the Javascript version. After selecting the version you want, you'll see a message that says the following:
cd my-project
npm install
npm run dev
Go ahead and run those commands, and you'll see a message that looks like the following:
Then, visit that URL in the browser (in my case, https://localhost:5173), and you'll see a new React app in front of you.
Time to start building 🛠️
Installing React with Laravel
Another option for installing React with a super-powered back-end is using React in a Laravel application.
Before installing a React+Laravel application, you must download Herd on your machine: https://herd.laravel.com. After installing, move into your Herd
directory, which will be ~/Herd
on Mac and c:>Herd
on Windows.
Next, run the following command:
laravel new my-project --using=tnylea/react-starter
This will install a React+Laravel application into a folder named my-project
. After the installation is completed, you'll see the following message:
Be sure to cd into your directory and run composer run dev
. Now you'll be able to visit HTTP://my-project.test in your browser, and you'll see the following page:
And now it's time to start building your new masterpiece.
Conclusion
There are many ways to install a React application. Choose the method that works best for you. I recommend installing React with Laravel, but if you do not need a back-end, go ahead and use Vite.