A

Admin • 833.24K Points
Coach

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
  • Correct Answer - Option(C)
  • Views: 28
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

`forwardRef` allows refs to be passed through a component to its children.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.