Q. What is `forwardRef` used for in React?

  • (A) Passing state between components
  • (B) Creating refs
  • (C) Forwarding a ref through a component to one of its children
  • (D) Memoizing props
πŸ’¬ Discuss
βœ… Correct Answer: (C) Forwarding a ref through a component to one of its children
Explanation: `forwardRef` allows refs to be passed through a component to its children.
Explanation by: Mr. Dubey
`forwardRef` allows refs to be passed through a component to its children.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
79
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate