Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/react-testing-library/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ as these methods:
- [`container`](#container)
- [`baseElement`](#baseelement)
- [`hydrate`](#hydrate)
- [`legacyRoot`](#legacyroot)
- [`wrapper`](#wrapper)
- [`queries`](#queries)
- [`render` Result](#render-result)
Expand Down Expand Up @@ -94,6 +95,15 @@ If hydrate is set to true, then it will render with
useful if you are using server-side rendering and use ReactDOM.hydrate to mount
your components.

### `legacyRoot`

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

### `wrapper`

Pass a React Component as the `wrapper` option to have it rendered around the
Expand Down