Skip to content

Commit aa9810f

Browse files
committed
Fixed some links and improved a recommendation
1 parent ac1d767 commit aa9810f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

content/docs/refs-and-the-dom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Your first inclination may be to use refs to "make things happen" in your app. I
3333

3434
> Note
3535
>
36-
> The examples below have been updated to use the React.createRef() API introduced in React 16.3. If you are using an earlier release of React, we recommend using [#callback-refs](callback refs) instead.
36+
> The examples below have been updated to use the React.createRef() API introduced in React 16.3. If you are using an earlier release of React, we recommend using [callback refs](#callback-refs) instead.
3737
3838
### Creating Refs
3939

@@ -345,7 +345,7 @@ If you worked with React before, you might be familiar with an older API where t
345345

346346
> Note
347347
>
348-
> If you're currently using `this.refs.textInput` to access refs, we recommend the callback pattern instead.
348+
> If you're currently using `this.refs.textInput` to access refs, we recommend using either the [callback pattern](#callback-refs) or the [`createRef` API](#creating-refs) instead.
349349
350350
### Caveats with callback refs
351351

content/docs/strict-mode.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Addressing the issues identified by strict mode _now_ will make it easier for yo
3434

3535
### Warning about legacy string ref API usage
3636

37-
Previously, React provided two ways for managing refs: the legacy string ref API and the callback API. Although the string ref API was the more convenient of the two, it had [several downsides](https://github.com/facebook/react/issues/1373) and so our official recommendation was to [use the callback form instead](https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs).
37+
Previously, React provided two ways for managing refs: the legacy string ref API and the callback API. Although the string ref API was the more convenient of the two, it had [several downsides](https://github.com/facebook/react/issues/1373) and so our official recommendation was to [use the callback form instead](/docs/refs-and-the-dom.html#legacy-api-string-refs).
3838

3939
React 16.3 added a third option that offers the convenience of a string ref without any of the downsides:
4040
`embed:16-3-release-blog-post/create-ref-example.js`

0 commit comments

Comments
 (0)