Skip to content

React JS quiz

Check your React knowledge across components, state, hooks, rendering, and performance.

Frontend · About 3 minutes

What does React use to efficiently update the browser UI?

Exit quiz

Question 1 of 5

React JS quiz questions and answers

Review all 5 questions at your own pace. Open each answer to see the correct response and a concise explanation of the concept.

Topics covered

  • Components
  • Props
  • State
  • Hooks
  • Rendering

What does React use to efficiently update the browser UI?

Correct answer

A virtual representation of UI state

React compares UI changes and updates the DOM efficiently based on component state.

Which hook is used to store local component state?

Correct answer

useState

useState stores values that trigger a re-render when they change.

When should useMemo be considered?

Correct answer

For expensive derived calculations

useMemo helps avoid recalculating expensive values unless dependencies change.

What causes many unnecessary React re-renders?

Correct answer

Changing props or state too broadly

State placed too high or recreated object props can cause large parts of the tree to re-render.

Which pattern keeps form input controlled by React state?

Correct answer

Controlled components

Controlled inputs use React state as the source of truth for field values.

Build something great with a React JS expert.

Need a teammate, not a test?