You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(* Since we don't push the root_data_payload to the stream but return it immediately with the initial HTML,
770
-
the stream's initial index starts at 1, with index 0 reserved for the root_data_payload. *)
771
-
let stream, context =Stream.make ~initial_index:1in
768
+
the stream's initial index starts at 1, with index 0 reserved for the root_data_payload.
769
+
770
+
The root is also treated as a pending segment that must complete before the stream can be closed,
771
+
as we don't push_async it to the stream, the pending counter starts at 1.
772
+
Similar on how react does: https://github.com/facebook/react/blob/7d9f876cbc7e9363092e60436704cf8ae435b969/packages/react-server/src/ReactFizzServer.js#L572-L581
773
+
*)
774
+
let stream, context =Stream.make ~initial_index:1~pending:1()in
0 commit comments