Skip to content

Commit

Permalink
Modernize API
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Sep 15, 2022
1 parent 7d80383 commit 2a0ff0f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fixtures/flight/src/index.js
Original file line number Diff line number Diff line change
@@ -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'));
Expand All @@ -9,9 +9,8 @@ function Content() {
return React.experimental_use(data);
}

ReactDOM.render(
ReactDOM.createRoot(document.getElementById('root')).render(
<Suspense fallback={<h1>Loading...</h1>}>
<Content />
</Suspense>,
document.getElementById('root')
</Suspense>
);

0 comments on commit 2a0ff0f

Please sign in to comment.