iTwin / viewer

Monorepo that contains the iTwin Viewer npm packages and their related packages
MIT License
24 stars 15 forks source link

Upgrading to react 18 #281

Closed Jake-Screen closed 11 months ago

Jake-Screen commented 1 year ago

Upgrading to react 18 and its associated packages

Jake-Screen commented 1 year ago

Currently failing to build due to tests, unable to run tests because of this. I expect many changes needed in regards to this error. From looking in to it, changes to test setup will be needed.

Current steps:

raplemie commented 11 months ago

FYI: In your app, you will probably want to call somewhere

import { createRoot } from "react-dom/client";
UiFramework.childWindows.useCreateRoot(createRoot);

So the popouts works correctly with React 18 (otherwise it will render with React 17 level features, which may or may not be correct)