React Tutorials/React App

  • Home
  • Database Certification
    • OCP Exam
    • Free Computer Book
    • Ebooks Download
  • Interview questions
    • SQL
      • Top Ten queries
      • Conditional Joins
      • Merging Rows
    • View In Oracle
    • Simple Queries
    • Conversion Function
  • Basic queries
    • Replace Function
    • Date Function
  • Home
  • DBA
    • Set Oracle Password
    • Bollean Datatypes
    • PLSQL BLOCK
  • Downloads
    • Express Edition Oracle
    • Sql Developer
    • Documentation
      • Office
  • Cursor
    • Explicite Cursor
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Tupperware Products
  • About Me

Thursday, May 4, 2023

Create a New React App

 May 04, 2023     No comments   

 

Create a New React App

 

Install  NodeJS and NPM. NodeJS and NPM are the platforms need to develop any ReactJS application. ..

. Using the npm command

npm init -y  

Once the Installation of Node is complete. Open Node.Js Command Prompt and we can check the version as well.

Run the following command to check the NPM version in the command prompt.

Node –v

Npm -v

 

 

Visual Studio Code is a free IDE from Microsoft built for developing and debugging web applications. It has integrated Git control & terminal.

Install Visual Studio Code

Download and install Visual Studio Code from the following URL.

 

After the installation, open the Project we have created earlier using the VS Code.

 

2) Install Create-React-App Tool

The next step is to install a tool called create-react-app using NPM.

This tool is used to create react applications easily from our system.

Steps To Follow:-

 

 1) Open a terminal(Windows Command Prompt or PowerShell).

2) Create a new Folder React

3) change the directory for e.g cd React

4) npm install react-router

5) npm install react-router-dom

6) Install React using create-react-app

 

 

 

 

Let's create a new Project now using the command.

 

npx create-react-app myapp2

Running the React Application.

Let us Open the browser http://localhost:3000.

Let's do CD to the Project we have created and run it locally on our system using npm start.

Launch the browser and visit http://localhost:3000. We can then see our first React Application response in the browser.

 

cd Myapp

npm start

 

 

 



 

What does app js contain in React?

src/App. js : This is the file for App Component. App Component is the main component in React which acts as a container for all other components.

The root is where the application layout structure is defined. It is typically the first UI element a user interacts with.

 

What is index js in React?

Index. js file is just like index. html file, if no specification is provided a directory points to it's index file.

 

Components are like functions that return HTML elements.

 

Let’s say there is a <div> somewhere in your HTML file:

 

<div id="root"></div>

We call this a “root” DOM node because everything inside it will be managed by React DOM.

To render a React element, first pass the DOM element to ReactDOM.createRoot(), then pass the React element to root.render():

 

const root = ReactDOM.createRoot(

  document.getElementById('root')

);

const element = <h1>Hello, world</h1>;

root.render(element);

components

The components folder in the simple folder structure is incredibly straightforward since it will contain every single component in your entire application

What is a App.css

CSS in React is used to style the React App or Component. The style attribute is the most used attribute for styling in React applications, which adds dynamically-computed styles at render time

 

Example Of Component Hello

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Home

0 Comments:

Post a Comment

Click on the links below to visit site

Popular Posts

  • Create a New React App
      Create a New React App   Install   NodeJS and NPM. NodeJS and NPM are the platforms need to develop any ReactJS application. .. . Us...
  • React Components
     React Components,Components are like functions that return HTML elements. Components are independent and reusable bits of code. They serve ...

Recent Posts

Unordered List

Pages

  • Home

Text Widget

Blog Archive

  • May 2023 (2)

Search This Blog

Powered by Blogger.

Report Abuse

About Me

My photo
Hemalata
View my complete profile
header ads

Technology

3/Technology/post-list

Recent in Sports

3/Sports/post-list

Business

Business/feat-big
  • Home
  • About
  • Contact Us
  • Home
  • Features
  • _Multi DropDown
  • __DropDown 1
  • __DropDown 2
  • __DropDown 3
  • _ShortCodes
  • _SiteMap
  • _Error Page
  • Mega Menu
  • Documentation
  • Video Documentation
  • Download This Template

Popular Posts

Create a New React App

Create a New React App

React Components

React Components

Menu Footer Widget

  • Home
  • About
  • Contact Us

Social Plugin

Sample Text

Copyright © React Tutorials/React App | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By blogger Templates