<hr>
Because React app consists of a single HTML file index.html. The views are coded in JSX format as components.
And when we need to build multi-page websites in React we use multiple routes instead of multiple pages to handle them.
<Route />
When the router’s path and location are successfully matched, a match object is created. This object contains information about the URL and the path. This information can be accessed as properties on the match object.
it is used to display whatever you include between the opening and closing tags when invoking a component.
setState() Class Component
useState() Functional Component
Hook is a special function that lets you “hook into” React features. For example, useState is a Hook that lets you add React state to function components.
Mounting a file system attaches that file system to a directory (mount point) and makes it available to the system. The root
/
file system is always mounted. Any other file system can be connected or disconnected from the root/
file system. These files are not permanently affected by the mounting process, and they become available again when the file system is Un-Mounting.
The Effect Hook lets you perform side effects in function components.
The function passed to useEffect will run after the render is committed to the screen.
By default, effects run after every completed render, but you can choose to fire them only when certain values have changed.