Ability to construct `ReadableStream` in Workers runtime

In April 2019, @harris mentioned that there weren’t any plans to implement custom ReadableStream Running into unimplemented functionality - #4 by harris

Recently, React announced Streaming SSR support in v18 alpha. In the browser/worker version of the React codebase, a new ReadableStream is constructed: react/ReactDOMFizzServerBrowser.js at 64f83a6fd24ddfcc74607e0e55b3fc9fe0d3c9b3 · facebook/react · GitHub

However, when this is run in a Cloudflare Worker, the following error is encountered:

Error: Failed to construct 'ReadableStream': the constructor is not implemented.
    at Object.reactDomUnstableFizz_browser_production_min.renderToReadableStream (worker.js:2028:12)

Is there a possibility that the ReadableStream constructor will be supported in the Workers runtime?

Yes – I can’t make any promises about the timeline, but we’re working on this.

1 Like