From 9a81aa29210bb63acfe0e5c7c0d4d7c202162987 Mon Sep 17 00:00:00 2001 From: Itay Gershman Date: Mon, 7 Oct 2024 14:31:27 +0300 Subject: [PATCH] use render instead of createRoot --- testKit/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testKit/index.tsx b/testKit/index.tsx index 9a4d944..826d4ef 100644 --- a/testKit/index.tsx +++ b/testKit/index.tsx @@ -1,7 +1,7 @@ import { create, act, ReactTestRenderer, ReactTestInstance, TestRendererOptions } from 'react-test-renderer' import _ from 'lodash' import React, { ReactElement } from 'react' -import { createRoot } from 'react-dom/client' +import ReactDOM from 'react-dom' import { EntryPoint, ObservableState, PrivateShell, ShellBoundaryAspect } from '../src/API' import { AnySlotKey, AppHost, AppMainView, createAppHost as _createAppHost, EntryPointOrPackage, Shell, SlotKey } from '../src/index' import { ShellRenderer } from '../src/renderSlotComponents' @@ -141,8 +141,7 @@ export const renderDOMInHost = (reactElement: ReactElement, host: AppHost = ) const container = document.body.querySelector('div') - const root = container && createRoot(container) - root?.render(Component) + ReactDOM.render(Component, container) } export const renderInHost = (