Question Bank

React Refs and Imperative Handles Quiz

Difficulty: Medium

Three drills on using refs to reach into the DOM, forwarding a ref through a wrapper component, and using useImperativeHandle to expose a controlled API.

Question Bank
/

React Refs and Imperative Handles Quiz

React Refs and Imperative Handles Quiz

Three drills on using refs to reach into the DOM, forwarding a ref through a wrapper component, and using useImperativeHandle to expose a controlled API.

Question Bank
Medium
JavaScript
3 questions
quiz
react
references
hooks

222 views

2

Use a ref to focus an <input> programmatically on mount. Why are refs the right tool here instead of state?