Creating a React application

Table of Contents

Creating a React application

  1. Do not use: https://legacy.reactjs.org/tutorial/tutorial.html#setup-option-2-local-development-environment
  2. Use: https://react.dev/learn/start-a-new-react-project#nextjs-pages-router
  3. https://create-react-app.dev/ If you want to create it inside the folder we are already in:
    npx create-react-app my-app-01
    
    If you want to create it in a different folder than the one we are already in:
    npx create-react-app /home/explorer436/Downloads/GitRepositories/programming-playground/react-playground/episode1
    
  4. Vite
    1. https://vite.dev/guide/
    2. Much faster than create-react-app
    3. Provides tons of features right out of the box - we get way better experience
    4. Scaffolding Your First Vite Project: https://vite.dev/guide/#scaffolding-your-first-vite-project
      # npm 7+, extra double-dash is needed:
      npm create vite@latest my-react-app -- --template react
      

Links to this note