From fe84e096dc8aa198b1f177d0c0641c0976d73134 Mon Sep 17 00:00:00 2001 From: Alex Krolick Date: Fri, 23 Mar 2018 11:25:41 -0700 Subject: [PATCH] Explain why you need forwardRef --- content/docs/context.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/context.md b/content/docs/context.md index 0d798490..907a9d3e 100644 --- a/content/docs/context.md +++ b/content/docs/context.md @@ -105,6 +105,8 @@ Accessing values from context in lifecycle methods is a relatively common use ca ## Forwarding Refs to Context Consumers +One issue with the render prop API is that refs don't automatically get passed to wrapped elements. To get around this, use `React.forwardRef`: + **fancy-button.js** `embed:context/forwarding-refs-fancy-button.js`