createRef
A React.createRef
emulation for React < 16.3
Installation
npm i --save createref
Usage
Usage is much the same as React.createRef
except that createRef
must be
imported separately because it is not available from the React package.
See Creating Refs in the official React documentation for further details.
;; Component { superprops; // assign the ref to the component instance thismyRef = ; } { // the element can be accessed on the current property of the ref console; } { // pass the ref to the rendered element return <div ref=thismyRef />; }