Home

2 minute read

Best way to create a React app 2025

Tony Lea

Best way to create a React app 2025

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:

Screenshot 2025-03-22 at 8.15.04 AM.png

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:

CleanShot 2025-03-22 at 08.10.45@2x.png

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:

Screenshot 2025-03-22 at 8.21.52 AM.png

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.

CleanShot 2025-03-22 at 08.22.44@2x.png

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:

Screenshot 2025-03-22 at 8.28.40 AM.png

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:

Screenshot 2025-03-22 at 8.29.37 AM.png

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.