Skip to content
the poor coder

Creating react app

Poor Man
Published
Reading time
1 min read
On this page

Creating a React App#

React is a popular JavaScript library for building user interfaces, and creating a React app is quick and simple. There are multiple ways to create a React app, but the most popular approach is using the create-react-app tool.

Using create-react-app#

To create a new React app using create-react-app, first make sure that you have Node.js installed on your computer. Then, open your terminal and run the following commands:

Bash
npx create-react-app my-app
cd my-app
npm start

The npx create-react-app my-app command creates a new React app with the name my-app, while the cd my-app command navigates into the project directory. Finally, the npm start command starts the development server and opens the app in your default browser.

By default, create-react-app sets up a basic React app with all the necessary dependencies and configurations. You can now start editing the src/App.js file to modify your app as needed.

Other Approaches#

While create-react-app is the most popular way to create a React app, there are other approaches you can take. For example, you can use a task runner like Gulp or Grunt to compile and bundle your React code, or configure webpack manually for more control over your build process.

However, these approaches require more configuration and setup, so they are not recommended for beginners. Stick with create-react-app until you feel comfortable with the React ecosystem.

hljs.highlightAll();

Keep going

2023

how to sort an array

How to Sort an Array If you have an array and you want to order its elements in a specific way, you need to use a sorting algorithm. There are several sorting algorithms available, but two of the most commonly used are…

javascript2 min read
2023

jquery mobile or desktop

jQuery Mobile or Desktop? As a web developer, I have had some experience with both jQuery Mobile and jQuery Desktop. Both frameworks have their pros and cons, and which one to use really depends on the specific project…

javascript1 min read
2023

node.js folder structure

Node.js Folder Structure If you are new to Node.js, it can be daunting to create a folder structure that will work for your project. The structure you choose will depend on the size and complexity of your project. Here…

javascript1 min read
ESC