Updated createRef example not to use class property syntax

This commit is contained in:
Brian Vaughn
2018-03-29 14:56:43 -07:00
parent 99d5ce47d3
commit 73ba23fccd

View File

@@ -1,6 +1,10 @@
class MyComponent extends React.Component {
// highlight-next-line
inputRef = React.createRef();
constructor(props) {
super(props);
// highlight-next-line
this.inputRef = React.createRef();
}
render() {
// highlight-next-line