From dfa9df042cd33d03ba3acb27a5cf2010aac8e6b0 Mon Sep 17 00:00:00 2001 From: Matan Borenkraout Date: Mon, 8 Apr 2024 17:13:24 +0300 Subject: [PATCH 1/2] docs: use warning admonition for `legacyRoot` --- docs/react-testing-library/api.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index 67009798c..b1aeb241f 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -107,7 +107,9 @@ your components. ### `legacyRoot` -**WARNING**: This option is only available when tests run with React 18 and earlier. +:::warning +This option is only available when tests run with React 18 and earlier. +::: By default we'll render with support for concurrent features (i.e. [`ReactDOMClient.createRoot`](https://reactjs.org/docs/react-dom-client.html#createroot)). From b59b730457faae6dfb0e0a7bf3dc45c296c07795 Mon Sep 17 00:00:00 2001 From: Matan Borenkraout Date: Mon, 8 Apr 2024 17:23:57 +0300 Subject: [PATCH 2/2] fix admonition --- docs/react-testing-library/api.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index b1aeb241f..493d75194 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -108,7 +108,9 @@ your components. ### `legacyRoot` :::warning + This option is only available when tests run with React 18 and earlier. + ::: By default we'll render with support for concurrent features (i.e. @@ -344,7 +346,7 @@ function renderHook< Props, Q extends Queries = typeof queries, Container extends Element | DocumentFragment = HTMLElement, - BaseElement extends Element | DocumentFragment = Container, + BaseElement extends Element | DocumentFragment = Container >( render: (initialProps: Props) => Result, options?: RenderHookOptions, @@ -477,4 +479,3 @@ configure({reactStrictMode: true}) When enabled, [``](https://react.dev/reference/react/StrictMode) is rendered around the inner element. Defaults to `false`. -