Skip to content

Commit 9948cc9

Browse files
committed
Add createRef to top level API section
1 parent 3d50f0d commit 9948cc9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

content/docs/reference-react.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ See [Using React without JSX](/docs/react-without-jsx.html) for more information
4949

5050
- [`React.Fragment`](#reactfragment)
5151

52-
### Other
52+
### Refs
5353

5454
- [`React.forwardRef`](#reactforwardref)
55+
- [`React.createRef`](#reactcreateref)
5556

5657
* * *
5758

@@ -227,4 +228,9 @@ You can also use it with the shorthand `<></>` syntax. For more information, see
227228
`React.forwardRef` accepts a render function that receives `props` and `ref` parameters and returns a React node. Ref forwarding is a technique for passing a [ref](/docs/refs-and-the-dom.html) through a component to one of its descendants. This technique can be particularly useful with [higher-order components](/docs/higher-order-components.html):
228229
`embed:reference-react-forward-ref.js`
229230
230-
For more information, see [forwarding refs](/docs/forwarding-refs.html).
231+
For more information, see [forwarding refs](/docs/forwarding-refs.html).
232+
233+
### `React.createRef`
234+
235+
`React.createRef` creates a ref that can be attached to React elements via the ref attribute.
236+
`embed:16-3-release-blog-post/create-ref-example.js`

0 commit comments

Comments
 (0)