Question Bank
3705 approved questions from the community
React components must return a single root element.
What is the main purpose of React Fiber's reconciliation algorithm?
Which hook would you use to perform side effects in a function component?
What is the correct way to update state based on the previous state value?
When using React.lazy() for code splitting, what component must wrap the lazy-loaded component?
The useCallback hook memoizes the result of a function, while useMemo memoizes a function itself.
React can only be used for building web applications.
Context API completely replaces the need for state management libraries like Redux.
Synthetic events in React are cross-browser wrappers around native browser events.
React.lazy only supports default exports for lazy-loaded components.
PropTypes are used for type-checking props at runtime in development mode.
What is prop drilling in React?
What is the correct way to import React in a modern React application?
What problem does React Concurrent Mode primarily solve?
shouldComponentUpdate is called before every re-render in class components.
React supports all HTML attributes including custom data attributes.
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.
Component names in React must start with a capital letter.
Keys in React must be globally unique across the entire application.