Skip to content

Commit

Permalink
use render instead of createRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay Gershman committed Oct 7, 2024
1 parent 256a311 commit 9a81aa2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions testKit/index.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -141,8 +141,7 @@ export const renderDOMInHost = (reactElement: ReactElement<any>, host: AppHost =
)

const container = document.body.querySelector('div')
const root = container && createRoot(container)
root?.render(Component)
ReactDOM.render(Component, container)
}

export const renderInHost = (
Expand Down

0 comments on commit 9a81aa2

Please sign in to comment.