Skip to content

Consider renaming renderToStream to renderToNodeStream #10388

@aickin

Description

@aickin

With the checkin of #10362, the code to render to a stream now looks like:

import { renderToStream } from 'react-dom/server'

renderToStream(<div>some text</div>).pipe(response);

This is great! I am, however, a little concerned about taking the word "node" out of the mix, because I'm thinking that we may eventually want to render to browser streams, which are a really neat feature that can be used in concert with "service-worker-side rendering". I would propose renaming renderToStream to renderToNodeStream and renderToStaticStream to renderToStaticNodeStream. This would give room for renderToBrowserStream in the future.

If I make a PR on this, would it have a chance of being accepted?

cc @gaearon & @sebmarkbage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions