Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee7964 commit 9c58a0bCopy full SHA for 9c58a0b
1 file changed
fixtures/flight/src/index.js
@@ -1,5 +1,5 @@
1
import * as React from 'react';
2
-import {Suspense} from 'react';
+import {use, Suspense} from 'react';
3
import ReactDOM from 'react-dom/client';
4
import {createFromFetch, encodeReply} from 'react-server-dom-webpack/client';
5
@@ -27,7 +27,8 @@ let data = createFromFetch(
27
}
28
);
29
30
-// TODO: This transition shouldn't really be necessary but it is for now.
31
-React.startTransition(() => {
32
- ReactDOM.hydrateRoot(document, data);
33
-});
+function Shell({data}) {
+ return use(data);
+}
+
34
+ReactDOM.hydrateRoot(document, <Shell data={data} />);
0 commit comments