Steps to create the React application
Step 1: Create a basic react app using the following command in your terminal.
npm create-react-app myreactapp
Step 2: Change your directory and enter your main folder
cd myreactapp
Step 3: Install react-router-dom for routing using this command
npm i react-router-dom
How to redirect to another page in ReactJS ?
Redirect to another page in React JS refers to navigating to different components in the single page react app using the react-router-dom package. To switch between multiple pages react-router-dom t enables you to implement dynamic routing in a web page.