create simple react website example

create simple react website example

In this article, we would like to inform you that how to create simple react website example. ReactJs is an open-source JavaScript library and it is developed by Facebook. react js can be used to make a single-page application(SPA). ReactJS is also used to reuse UI components and run without reloading application so it is scalable, simple, and fast.

So, you can follow the below steps for create simple react website example.

Step 1: Install React Application

In this step, if you want to create a react application then you can follow below Url for install react js.

Step 2: Install bootstrap in react

now, After the installation of react js, you can install the bootstrap using the below command.

here, we will import the bootstrap in the app.js file, so you can see the below code.
src/app.js

Step 3: Configure React routing

The below command using install the react route. so you can follow the below command.

Go to the index.js file and Modify the below code.
src/index.js

Step 4: Create react components

here in this step, we will create three components, like home, about, and contact. so you can see the below code.
src/home.component.js

src/about.component.js

src/contact.component.js

Step 5: Set up the route inside the App.js

now, we load the header menu and set up the route inside the App.js file.
src/App.js

Step 6: Run React js application

If you want to run the application then you can follow the below command. if you any change in your app then use the npm run build and after you can run the application.

Now we will run our application using the below Url in the browser.

homepage

aboutpage

contactpage

Related Posts
Please follow and like us: