Create-React-App

Prerequisites

  • HTML+CSS+JavaScript (basic)
  • Node.js (npm package manager)
  • Code editor

Support

Create-React-App (create react app folder inside parent folder)

  1. Create a folder on your local machine
    OR
    Create a repository on your GitHub account
  2. Open the folder/repository in the code editor
  3. Start the terminal on the code editor
    Shortcut: Ctrl+`
  4. Run npm init — — yes
  5. Now you can see the package.json file created in your folder
  6. Run npx create-react-app myappname
    Note: you can change the app name from “myappname” to meet your requirements
  7. Now you can see the react app folder created in your parent folder.
  8. Run cd myappname
    Note
    : in place of myappname, add the app name you gave in step 6
  9. To start the app, run npm start
  10. To build the app, run npm run build

Create-React-App (create react app in parent folder)

  1. Create a folder on your local machine with lowercase
    OR
    Create a repository on your GitHub account
  2. Open the folder/repository in the code editor
  3. Start the terminal on the code editor
    Shortcut: Ctrl+`
  4. Make sure your folder contains nothing
  5. Run npx create-react-app .
    Note: use dot instead of appname
  6. Now you can see the react app created in your parent folder.
  7. To start the app, run npm start
  8. To build the app, run npm run build

Congratulations you just created your first react app!!!

--

--

--

Technical Writer, Software Developer, Blogger, and Career Development Coach…

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Chapter 8 Creating a Beautiful User Experience

11 Popular Misconceptions About Micro Frontends

Make Life Simple for Your Callers

Intro to React Hooks- Part 11

Changing parent element of dynamic Angular component

Why does this site require JavaScript?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chanchala Gorale

Chanchala Gorale

Technical Writer, Software Developer, Blogger, and Career Development Coach…

More from Medium

React accordion frontend task with custom hooks

Using Conditional Logic in Forms with Controlled Inputs in a React front-end

Form Handling in React JS Using React Hook Form Library

Mastering React Hooks: Part 1 — Basic Concept