React Fundamentals
0% completed
Previous
Next
Course
Discussions
Quiz
Which of the following describes a primary use case of the useRef hook in React?
A
To pass props to child components.
B
To replace the useState hook for managing dynamic data.
C
To access and modify a DOM element directly.
D
To manage component state and trigger re-renders.
Reset Quiz
Check Answer
Which of the following is true about the difference between state and ref in React?
A
ref is suitable for storing values that affect the UI rendering.
B
ref values cause re-renders when updated, but state values do not.
C
state values can only be accessed directly through ref.current.
D
Changing state triggers a re-render of the component, while changing a ref does not.
Reset Quiz
Check Answer
.....
.....
.....
Like the course? Get enrolled and start learning!
Enroll
Previous
Next