diff --git a/examples/16-3-release-blog-post/create-ref-example.js b/examples/16-3-release-blog-post/create-ref-example.js index d91cb6c2..12faf96d 100644 --- a/examples/16-3-release-blog-post/create-ref-example.js +++ b/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