Git Product home page Git Product logo

react_setup's Introduction

Getting Started with React πŸš€

πŸ‘‰ Method 1: Using Create-React-App

Step 1: Install Node.js

Ensure that you have Node.js installed on your system.
You can download it from nodejs.org.

Step 2: Create a New Folder

Open your terminal and create a new folder for your React project.
For example, let's name it

mkdir ReactApp.

Step 3: Change Directory to Your Project Folder

Navigate to the newly created folder using the command line.

cd ReactApp

Step 4: Create a New React App

Run the following command to generate a new React app.

npx create-react-app demoReactApp

Step 5: Change Directory to Your App

Move into the newly created app folder.

cd ReactApp demoReactApp

Step 6: Start the Development Server

Launch the development server.

npm start

πŸ‘‰ Method 2: Manual Setup

Step 1: Open Folder and Create index.html File

Open your preferred text editor, create an index.html file, and save it in your project folder.

Step 2: Open Terminal

Open your terminal or command prompt.

Step 3: Initialize npm

Run the following command.

npm init

Step 4: Install Parcel as a Dev Dependency

Install Parcel as a development dependency.

npm install -D parcel

Step 5: Install React and React-DOM

Install React and React-DOM.

npm install react
npm install react-dom

Step 6: Run Parcel for Local Development

Run the following command to start a local development server.

npx parcel index.html

Production Build

To create a production build, use the following command.

npx parcel build index.html

πŸ‘‰Method 3: Started with Vite

This guide will walk you through the steps to create a Vite project and run it using npm.

Step 1: Create a Vite Project

Use the following command to create a new Vite project:

npm create vite

Step 2: Project Setup

After running the command, you will be prompted to enter the project name.
Choose a suitable name for your project.

Step 3 : Select Framework

After entering your project name, Vite will prompt you to select a framework:
Use your keyboard arrow key to select React.

Step 4 : Select Language

After selecting the React framework, Vite will prompt you to choose the language type.
Use your arrow keys to select JavaScript

Step 5: Install Dependencies

Install the project dependencies using the following command:

npm install

Step 6: Run the Project

Now, you can run the Vite project with the following command:

npm run dev

πŸ§‘β€πŸ’» Happy coding!

react_setup's People

Contributors

thepravin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.