/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
packages/react-devtools-shell/src/e2e/app.js
20 строк
643 B
Josh Story
[react-dom] move all client code to `react-dom/client` (#28271)
24 апр 2024, 18:50
Не верифицирован
24 апр 2024, 18:50
cb15184
Код
Авторство
О чём код?
/** @flow */ // This test harness mounts each test app as a separate root to test multi-root applications. import * as React from 'react'; import * as ReactDOMClient from 'react-dom/client'; const container = document.createElement('div'); ((document.body: any): HTMLBodyElement).appendChild(container); // TODO We may want to parameterize this app // so that it can load things other than just ToDoList. const App = require('../e2e-apps/ListApp').default; const root = ReactDOMClient.createRoot(container); root.render(<App />); // ReactDOM Test Selector APIs used by Playwright e2e tests window.parent.REACT_DOM_APP = ReactDOMClient;