Writing Hello World code in React

In this tutorial we will see how we can get started with React by writing the Hello World application.

First create index.js in your folder and add the following code to it

Then you can create index.html file and define the root element

Then I am going to open the terminal and change the directory where I have the files
I will run the following command to install httpster server

Once you install the server you can start the server with following command at terminal

When you start the server you will get following message
Starting HTTPster v1.0.3 on port 3333 from /Users/Dev/Documents/react

Now you can open the page http://localhost:3333/ and see the “Hello world” message