Explanation: React uses components to encapsulate and reuse UI pieces.
Dear candidates you will find MCQ questions of React Js here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Explanation: React uses components to encapsulate and reuse UI pieces.
Explanation: Fragments allow grouping elements without adding extra nodes to the DOM.
Explanation: useRef keeps a persistent mutable value that does not cause re-render when updated.
Explanation: useMemo is for expensive value computations; useCallback is for memoizing functions.
Explanation: Functional components are created using JavaScript functions.
Explanation: Functions are passed as props using curly braces without invoking them.
Explanation: Custom hooks let you reuse stateful logic across components.
Explanation: The key prop helps React identify individual items in lists efficiently.
Explanation: Without a dependency array, useEffect runs after every render.
Explanation: `ReactDOM.render()` mounts a React component to a specific DOM node.