Skip to content

Commit 78661f3

Browse files
authored
docs: update react doc links (#1399)
1 parent 0c01661 commit 78661f3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/react-testing-library/api.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ well as what is printed when you use `debug()`.
101101
### `hydrate`
102102

103103
If hydrate is set to true, then it will render with
104-
[ReactDOM.hydrate](https://reactjs.org/docs/react-dom.html#hydrate). This may be
104+
[ReactDOM.hydrate](https://react.dev/reference/react-dom/hydrate#hydrate). This may be
105105
useful if you are using server-side rendering and use ReactDOM.hydrate to mount
106106
your components.
107107

@@ -114,10 +114,10 @@ This option is only available when tests run with React 18 and earlier.
114114
:::
115115

116116
By default we'll render with support for concurrent features (i.e.
117-
[`ReactDOMClient.createRoot`](https://reactjs.org/docs/react-dom-client.html#createroot)).
117+
[`ReactDOMClient.createRoot`](https://react.dev/reference/react-dom/client/createRoot)).
118118
However, if you're dealing with a legacy app that requires rendering like in
119119
React 17 (i.e.
120-
[`ReactDOM.render`](https://reactjs.org/docs/react-dom.html#render)) then you
120+
[`ReactDOM.render`](https://react.dev/reference/react-dom/render)) then you
121121
should enable this option by setting `legacyRoot: true`.
122122

123123
### `wrapper`
@@ -176,7 +176,7 @@ The containing DOM node of your rendered React Element (rendered using
176176
> `container.firstChild`.
177177
>
178178
> NOTE: When that root element is a
179-
> [React Fragment](https://reactjs.org/docs/fragments.html),
179+
> [React Fragment](https://react.dev/reference/react/Fragment),
180180
> `container.firstChild` will only get the first child of that Fragment, not the
181181
> Fragment itself.
182182

@@ -327,10 +327,10 @@ errors in your tests).
327327
## `act`
328328
329329
This is a light wrapper around the
330-
[`react-dom/test-utils` `act` function](https://reactjs.org/docs/test-utils.html#act).
330+
[`react` `act` function](https://react.dev/reference/react/act).
331331
All it does is forward all arguments to the act function if your version of
332332
react supports `act`. It is recommended to use the import from
333-
`@testing-library/react` over `react-dom/test-utils` for consistency reasons.
333+
`@testing-library/react` over `react` for consistency reasons.
334334
335335
## `renderHook`
336336
@@ -432,7 +432,7 @@ expect(result.current).toBe('Alice')
432432
```
433433
434434
Note that the value is held in `result.current`. Think of `result` as a
435-
[ref](https://reactjs.org/docs/glossary.html#refs) for the most recently
435+
[ref](https://react.dev/learn/referencing-values-with-refs) for the most recently
436436
**committed** value.
437437
438438
### `rerender`

docs/react-testing-library/cheatsheet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ See [Events API](dom-testing-library/api-events.mdx)
124124
- **click** `fireEvent.click(node)`
125125
- [See all supported events](https://github.com/testing-library/dom-testing-library/blob/master/src/event-map.js)
126126
- **act** wrapper around
127-
[react-dom/test-utils act](https://reactjs.org/docs/test-utils.html#act);
127+
[react act](https://react.dev/reference/react/act);
128128
React Testing Library wraps render and fireEvent in a call to `act` already so
129129
most cases should not require using it manually
130130

0 commit comments

Comments
 (0)