Question 1 of 5
Need a teammate, not a test?
Build something great with a React JS expert.
Study guide
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.
1What 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.
2Which hook is used to store local component state?
Correct answer
useState
useState stores values that trigger a re-render when they change.
3When should useMemo be considered?
Correct answer
For expensive derived calculations
useMemo helps avoid recalculating expensive values unless dependencies change.
4What 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.
5Which 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.