From 73ba23fccddb06c714a9c72ec8fab08638b2033c Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 29 Mar 2018 14:56:43 -0700 Subject: [PATCH] Updated createRef example not to use class property syntax --- examples/16-3-release-blog-post/create-ref-example.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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