forwardRef Quiz
Test your knowledge of React forwardRef, ref forwarding, imperative handles, reusable components, and the React 19 ref-as-prop change.
20 questions · free · answers explained
All questions in this quiz
- What does forwardRef let a React component do?
- Which package exports forwardRef?
- What are the arguments passed to a forwardRef render function?
- What is a common use case for forwardRef?
- What happens if a forwardRef component receives a ref but never passes it anywhere?
- What does useImperativeHandle let a forwardRef component expose?
- Why might exposing a full DOM node through a ref be a tradeoff?
- For which components is ref forwarding most commonly appropriate?
- What should you usually prefer if behavior can be expressed declaratively?
- How does Strict Mode affect the forwardRef render function in development?
- In React 19, what changed about refs for function components?
- Why is forwardRef still useful to understand?
- What should a forwardRef component usually do with other props?
- What is a common TypeScript concern with forwardRef?
- What does the parent receive when useImperativeHandle exposes custom methods?
- Which imperative behavior is a reasonable ref use case?
- What is a common mistake when forwarding refs through multiple components?
- Can forwardRef return a component that is rendered in JSX?
- What is the ref value before a DOM element is mounted?
- Which pattern best limits what a parent can do with a child input?
Prefer to read first? React interview questions with written answers.