1. When should you use context API?

Ans: Context is designed to share data that can be considered as "global" to the whole app.


2. What is a custom hook?

Ans: Custom Hooks are functions. Usually, they start with the word “use”.Custom Hooks allow us to access the React ecosystem in terms of hooks, which means we have access to all the known hooks like useState, useMemo, useEffect, etc.


3. What is useRef?

Ans: One of the various hooks included in React is the useRef hook; it is used to reference an object inside a functional component and preserves the referenced object's state between re-renders.


4. What is useMemo?

Ans: React has a built-in hook called useMemo that allows you to memoize expensive functions so that you can avoid calling them on every render. You simple pass in a function and an array of inputs and useMemo will only recompute the memoized value when one of the inputs has changed.