Initial Setup for creating a basic React App: Part 2

Bhavya Gupta
1 min readJun 17, 2020

--

1. Getting Started

To start building a User Interface, set up your React Project

  1. Install create-react-app globally :

npm install -g create-react-app

2. Create a new project ( give it any name like ‘my-app’)

create-react-app my-app

cd my-app

npm start

Open localhost:3000 in your browser to see the basic react app in action.

Now, we have set up our project, so let’s begin with our frontend part. You can create this React Project either in Sublime Text, Visual Studio Code or even in Intellij.

2. Creating a Home Page

3. Enable Routing in React

Install react-router-dom module to enable Router service to React.

npm install — save react-router-dom

Then go to src/index.js and add the following code.

Create a components directory in src folder and create Navigation.js file in src/components

Create App.js file in src/components. Add the following code in App.js .

Final Product :

We are building a simple Register Form Page using React, where the Register Form data can be submitted from ReactJS

So, let’s begin with Part 3 of the tutorial.

--

--