From 2a0ff0f8a9826445551b2e39de019104d250fc42 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Wed, 14 Sep 2022 22:46:31 -0400 Subject: [PATCH] Modernize API --- fixtures/flight/src/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fixtures/flight/src/index.js b/fixtures/flight/src/index.js index b54a69ed7ba26..0c35d289c2be2 100644 --- a/fixtures/flight/src/index.js +++ b/fixtures/flight/src/index.js @@ -1,6 +1,6 @@ import * as React from 'react'; import {Suspense} from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from 'react-dom/client'; import ReactServerDOMReader from 'react-server-dom-webpack'; let data = ReactServerDOMReader.createFromFetch(fetch('http://localhost:3001')); @@ -9,9 +9,8 @@ function Content() { return React.experimental_use(data); } -ReactDOM.render( +ReactDOM.createRoot(document.getElementById('root')).render( Loading...}> - , - document.getElementById('root') + );