Browse Source

Replaced hyphen with em dash

main
Brian Vaughn 7 years ago
parent
commit
99d5ce47d3
  1. 2
      content/blog/2018-03-29-react-v-16-3.md

2
content/blog/2018-03-29-react-v-16-3.md

@ -47,7 +47,7 @@ We can use the above HOC to wire components up to the theme context without havi
`embed:16-3-release-blog-post/fancy-button-example.js`
HOCs typically [pass props through](/docs/higher-order-components.html#convention-pass-unrelated-props-through-to-the-wrapped-component) to the components they wrap. Unfortunately, [refs are not passed through](/docs/higher-order-components.html#refs-arent-passed-through). This means that we can't attach a ref to `FancyButton` if we use `FancyThemedButton`- so there's no way for us to call `focus()`.
HOCs typically [pass props through](/docs/higher-order-components.html#convention-pass-unrelated-props-through-to-the-wrapped-component) to the components they wrap. Unfortunately, [refs are not passed through](/docs/higher-order-components.html#refs-arent-passed-through). This means that we can't attach a ref to `FancyButton` if we use `FancyThemedButton` so there's no way for us to call `focus()`.
The new `forwardRef` API solves this problem by providing a way for us to intercept a `ref` and forward it as a normal prop:
`embed:16-3-release-blog-post/forward-ref-example.js`

Loading…
Cancel
Save