Create a hello world app with reactJs

Hello World, Welcome to my website. Today I am going to create a hello world app with reactjs. In this tutorial, we will cover the following things.

  • Introduction of ReactJs
  • Setup reactjs and create hello world app with reactjs

Introduction of ReactJs

React is a JavaScript library for building user interfaces across a variety of platforms.
React gives you a powerful mental model to work with and helps you build user
interfaces in a declarative and component­ driven way.

Learn More About React

Setup ReactJs and create a hello world app

We will setup reactjs and create a hello world application with the following steps.

  • Create helloWorld folder on your server.
  • Create index.php file in this newly created folder.
  • Add the following code in index.php file.
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Hello World - React Application</title>
    <div id="root"></div>
<!-- Include Scripts -->
<script crossorigin src=""></script>
<script crossorigin src=""></script>
<script src=""></script>
<!-- Custom Script -->
<script type="text/babel">
    class App extends React.Component{
            return <h1>Hello World</h1>
    ReactDOM.render(<App />,document.getElementById('root'));

Here we are not using nodejs or npm for creating react application. We are using cdn links of reactjs library.

Now run the application on your browser.

Your appreciation is my motivation 🙂