Skip to content

Commit 408ed68

Browse files
eps1lonMatanBobi
andauthored
docs: Add render#legacyRoot (#1034)
Co-authored-by: Matan Borenkraout <[email protected]>
1 parent 8acaf6e commit 408ed68

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/react-testing-library/api.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ as these methods:
1111
- [`container`](#container)
1212
- [`baseElement`](#baseelement)
1313
- [`hydrate`](#hydrate)
14+
- [`legacyRoot`](#legacyroot)
1415
- [`wrapper`](#wrapper)
1516
- [`queries`](#queries)
1617
- [`render` Result](#render-result)
@@ -94,6 +95,15 @@ If hydrate is set to true, then it will render with
9495
useful if you are using server-side rendering and use ReactDOM.hydrate to mount
9596
your components.
9697

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

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

0 commit comments

Comments
 (0)