React.createRef() polyfill
npm install react-create-refReact.createRef() polyfill for React < 16.3
Install
=======
``sh
`
npm install react-create-ref --save
React.createRef()
Use
===
Calls native if it's available (React >= 16.3), calls the polyfill function otherwise (React < 16.3).
`
js
``
import createRef from 'react-create-ref'
class Example extends React.Component {
constructor() {
this.input = createRef()
}
render() {
return (
)
}
}