React js tutorial – Make Simple Application

Let’s make a simple react js application. I am going to make a folder in the desktop called “React Simple”. because I am going to make our react application in this folder. So first of all let’s install react. let’s start “React js tutorial – Make Simple Application” article.


Advertisement

Open your command promt and make the path to your folder.

React js tutorial - Make Simple Application
Make path to the folder

After that we must install react to create an application.

After installing react, then create an application name.

create application name



After that do the following code as well.

React js tutorial - Make Simple Application

After “npm start” you can see a window like this. (it will open with the web browser)

React js tutorial - Make Simple Application

This is the application that we are created. This like a live previewer. It means when we change those codes, it will automatically change their changes. It means no need to refresh your browser.

First of introducing this window, go to you folder and you can open with Visual Code( download VS Code and you can refer the documentation ) or any kind of familiar software that is support to react js. Also you can use notepad or notepad++. For your support I will do the coding using Notepad++.


React js tutorial – Make Simple Application

“C:\Users\Asus\Desktop\React Simple\reactsimple\src” go to this location and open App.js file using notepad++.

React js tutorial - Make Simple Application

Advertisement



I highlighted an area. In that area you can edit what you want. To get understand, you can delete that area and edit some text. So you can see the changes in the web browser that was loaded when we start our application.

In the above image, You can see I used <h1> tag, without using <h1> tag you can see a error like this.

It says “BuildITMasters” is not defined. So we need keywords to defined content.



React.org says, you can use “ReactDom.render(<p>Hello</p>, document.getElementById(“react01”));” to “<div id = “react01”>hello </div>“. So it means those tags are not HTML tags.



So we must code our content using those kind of keywords.

Thank you for reading. If you are interesting on my article, make sure to follow my other articles as well. Make sure to leave a comment.

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x