How to write the first program in Reactjs?

In this reactjs tutorial for beginners we learn how to write the first program in react js and make the first file also.
Open your project in visual studio code and run the command npm start.
OR
Open your project using cmd follow the bellow steps. (refer the below image for your reference).
- C:\Users\user>cd project
- C:\Users\user\project>cd blog
- C:\Users\user\project\blog>npm start

Make New File (refer the below image for your reference).
- Right Click on src folder and click on New File to create your first file.
- Give the file name for your page like (Login.js) keep the first latter as capitalize.
- Wright below code in your file (Login.js).
function Login () {
return (
<div className="App">
<h1>Hello World</h1>
</div>
);
}
export default Login;

- Open Index.js file and import or replace default ‘./App’ file name to your file name ‘/Login’.
- Same as in render function, just add or replace <App /> tag to your file name tag <Login />.

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

Getting Started with Create React App. This project was bootstrapped with Create React App.
Open your project in visual studio code using shortcut (code .) in command prompt
C:\Users\user\project\blog>code .