Re: [whatwg/streams] Idiomatic Way to Explicitly Tell an Underlying Transform Stream to Flush to the Sink (#960)

Yes specifically it would be something like:

```js
let reactStream = React.renderToReadableStream(reactComponents);
event.respondWith(new Response(reactStream.pipeThrough(gzipTransform));
```

Possibly with an extra `.pipeThrough(encryptionTransform)`.

The `reactStream` is the source that knows that it's a good time to flush. Concretely, if the React components deep in the tree are waiting for I/O, and there is nothing more in the queue to process, then now it's a good time to flush what we have right now.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/960#issuecomment-436784245

Received on Wednesday, 7 November 2018 21:30:48 UTC