Question Bank
1899 approved questions from the community
The useCallback hook memoizes the result of a function, while useMemo memoizes a function itself.
Context API completely replaces the need for state management libraries like Redux.
React.lazy only supports default exports for lazy-loaded components.
What is prop drilling in React?
shouldComponentUpdate is called before every re-render in class components.
Default props values are applied when a prop is explicitly passed as undefined.
React DevTools can be used to inspect component props and state in production builds.
Keys in React must be globally unique across the entire application.
What is the primary use case for keyed fragments?
The useDebugValue hook is visible in production builds.
Defining nested function components inside parent components is a recommended pattern.
What is the purpose of React.StrictMode?
useState can accept a function as its initial value for lazy initialization.
What is a wrapper component in React?
Which of the following are valid ways to conditionally render components in React? (Select all that apply)
Which of the following are benefits of using the Virtual DOM? (Select all that apply)
Which of the following are valid use cases for useRef? (Select all that apply)
Which of the following are part of the React component lifecycle? (Select all that apply)
Which of the following are advantages of using React? (Select all that apply)
Which rules does the diffing algorithm follow? (Select all that apply)