1. What is react-router explain with syntax?
React Router is a library for routing in React. It enables the navigation among routes in a React Application. It allows changing the browser URL, and keeps the UI in sync with the URL.
Example:
2. What is Virtual DOM?
A Virtual DOM is a JS object, which is the virtual representation of an HTML DOM.
Whenever new elements are added to the UI, a virtual DOM is created.
React compares new virtual DOM with current virtual DOM, and the difference will be efficiently updated to the Real DOM. So, the Virtual DOM helps to render the UI more performantly.
3. What is React Context?
React Context is a mechanism to avoid prop drilling.
Prop Drilling means passing data from one Component to another Component that does not need the data but only helps in passing it through the tree.
Refer to this for more information regarding React Context.