0% found this document useful (0 votes)
32 views2 pages

Practical 1 Setting Up React

The document outlines the steps to set up a React development environment using Node.js and Create React App. It includes instructions for installing Node.js, creating a new React app, and running it to display a simple message. The provided code for the main application component renders a welcome message in the browser.

Uploaded by

sheetaldankher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Practical 1 Setting Up React

The document outlines the steps to set up a React development environment using Node.js and Create React App. It includes instructions for installing Node.js, creating a new React app, and running it to display a simple message. The provided code for the main application component renders a welcome message in the browser.

Uploaded by

sheetaldankher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical 1: Setting Up the Environment in React

Objective:

To set up a React development environment using Node.js and Create React App, and create a

basic React project displaying "Hello, React!".

Steps:

1. Install Node.js and npm:

- Download and install Node.js from https://nodejs.org/

- Verify installation:

node -v

npm -v

2. Create a React App:

Open your terminal and run:

npx create-react-app hello-react

cd hello-react

npm start

This will start a development server and open the default React app in your browser.

Code (src/App.js):

import React from 'react';

function App() {
return (

<div style={{ textAlign: 'center', marginTop: '50px' }}>

<h1>Hello, React!</h1>

<p>Welcome to your first React application setup.</p>

</div>

);

export default App;

Output:

When you run `npm start`, your browser should display:

Hello, React!

Welcome to your first React application setup.

You might also like