Skip to content

Commit

Permalink
docs: Add render#legacyRoot (#1034)
Browse files Browse the repository at this point in the history
Co-authored-by: Matan Borenkraout <[email protected]>
  • Loading branch information
eps1lon and MatanBobi authored Mar 31, 2022
1 parent 8acaf6e commit 408ed68
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 408ed68

Please sign in to comment.