From 17d04ac9f314297dc600681cc194f2afff2e44ed Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Sat, 31 Mar 2018 19:10:54 +0100 Subject: [PATCH] Fix: added missing component instantiation within the 'forwardRef' API example --- examples/16-3-release-blog-post/forward-ref-example.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/16-3-release-blog-post/forward-ref-example.js b/examples/16-3-release-blog-post/forward-ref-example.js index af6bb9f4..aca46dd2 100644 --- a/examples/16-3-release-blog-post/forward-ref-example.js +++ b/examples/16-3-release-blog-post/forward-ref-example.js @@ -24,6 +24,10 @@ function withTheme(Component) { return React.forwardRef(ThemedComponent); } +// Here we assume that FancyButton has been imported into the current scope +const FancyThemedButton = withTheme(FancyButton); + +// Create a ref using the new Referenace API, as above // highlight-next-line const fancyButtonRef = React.createRef();