Find-Q

HomeChartsBlog

Welcome To Our Blog Page

1 What is the purpose of React Router?

React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, and keeps the UI in sync with the URL. Let us create a simple application to React to understand how the React Router works.

2 How does context API work?

The React Context API is a way for a React app to effectively produce global variables that can be passed around.This way we can avoid props drilling. And we can pass any data, any function to any child component I mean in any component in the tree. The data provided by context is global. Any component in the tree can get the data.

3 What is useRef hook and how does it work?.

The useRef Hook allows you to persist values between renders. It can be used to store a mutable value that does not cause a re-render when updated. It can be used to access a DOM element directly. We can also use it as a variable like a state. But the difference is the component will not render when its value changes.

© 2022 Copyrights — MD Mohaiminul Islam