Browse Source

Updated createRef example not to use class property syntax

main
Brian Vaughn 7 years ago
parent
commit
73ba23fccd
  1. 8
      examples/16-3-release-blog-post/create-ref-example.js

8
examples/16-3-release-blog-post/create-ref-example.js

@ -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

Loading…
Cancel
Save