| 1 | /** @flow */ |
| 2 | |
| 3 | // This test harness mounts each test app as a separate root to test multi-root applications. |
| 4 | |
| 5 | import * as React from 'react'; |
| 6 | import {createRoot} from 'react-dom/client'; |
| 7 | import App from './apps/index'; |
| 8 | |
| 9 | function mountApp() { |
| 10 | const container = document.createElement('div'); |
| 11 | |
| 12 | (document.body as any as HTMLBodyElement).appendChild(container); |
| 13 | |
| 14 | const root = createRoot(container); |
| 15 | root.render( |
| 16 | <React.StrictMode> |
| 17 | <App /> |
| 18 | </React.StrictMode>, |
| 19 | ); |
| 20 | } |
| 21 | |
| 22 | mountApp(); |