React forwardRef example and why it should not be part of React API

added by JavaScript Kicks
12/19/2018 7:53:38 AM

565 Views

React 16 has a forwardRef function. The function creates a new component with its ref attached to one of the child component. Why is this a big deal? In React, key and ref are special props which are not part of this.props within the component. I will explain this with a little bit of code.


0 comments