React.createRef()
polyfill for React < 16.3
Install
npm install react-create-ref --save
Use
Calls native React.createRef()
if it's available (React >= 16.3), calls the polyfill function otherwise (React < 16.3).
Component { thisinput = } { return <form> <input type="text" ref=thisinput /> <button type="button" onClick= thisinputcurrent /> </form> }