Create a React component in JavaScript. Create a component file called App in the src directory.
Create three parts. To begin, create a components directory and add the Home. js component to it.
In the App. js file, register the routes.
A Route> component will be used to identify each route. Two properties will be passed to the Route> component: path and component. It will return the component supplied if a path matches the route given to the Route> component.
Install react-router-dom in our application's root directory. Make the components we'll be rendering. From the react-router-dom API, import the BrowserRouter, Route, and Switch components. Wrap the App component with the BrowserRouter to enable routing functionality for the App.
React Router's most significant component is the Route component. If the current location fits the route's path, it displays some UI. A Route> component should ideally have a path prop, which is rendered if the path name matches the current location.
React Router isn't required in this situation. React Router, on the other hand, has a lot of navigational components that you can use to assemble your application declaratively, which may be quite beneficial for larger and more sophisticated navigational requirements in React apps. It's also excellent for React Native apps.
Learner's Ratings
4.5
Overall Rating
74%
12%
8%
1%
5%
Reviews
M
Mohanlal Khhurana
5
Very helpful course in learning ReactJS
L
LOVKUSH
5
HTTP moudule ka code hee nhi hai .
Please provide Its most imp. thing in entire course.
The zip is empty
Ishwar Shankar Chavan
5
mam such a great hard work really it is ever best course for beginner to advance .......thanks mam
N
Nitish Kumar Sharma
5
What madam is telling is difficult to understand please update your faculty.
R
Ramanjjilu Naidu
5
May I know where is the source code please. and yes I am very happy to learn with you.
S
sumit kumar
5
Best Course
S
Shivam gupta
5
course is very very good but in source link not any type of css styling file when i extracted it then empty folder is shown module 4 topic is form added
please solve the issue for our practicing
Share a personalized message with your friends.