Define useState.
A Hook that lets you add state to functional components.
What does useEffect do?
It allows you to perform side effects in function components.
True or false: useContext provides a way to pass data through the component tree.
TRUE
It avoids prop drilling by allowing components to access context directly.
Fill in the blank: useReducer is used for managing _______ in React.
complex state logic
What is the purpose of useMemo?
It memoizes a computed value to optimize performance.
Define useCallback.
A Hook that returns a memoized callback function.
What does useRef return?
A mutable ref object whose .current property is initialized to the passed argument.
True or false: useLayoutEffect runs synchronously after all DOM mutations.
TRUE
It is useful for reading layout from the DOM and synchronously re-rendering.
Fill in the blank: useImperativeHandle customizes the instance value that is _______.
exposed to parent components
What is the main use of useDebugValue?
To display a label for custom hooks in React DevTools.
Define useTransition.
A Hook that allows you to mark updates as transitions for better user experience.