Articles → REACTJS → Create our first react.js application from scratch

Create our first react.js application from scratch






Create your react.js project




npx create-react-app myfirstreactjsapp





Adding new file inside the src folder




import React from 'react';
import ReactDOM from 'react-dom'

const element = <h1>Hello World</h1>;

ReactDOM.render(element, document.getElementById('root'));



Run the application




Picture showing the output of the first react.js application from scratch

Click to Enlarge


Render method












ReactDOM.render(element, document.getElementById('root'));





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, July 28, 2021
 
Updated On  -  Tuesday, August 3, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250