Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fizz] New Server Rendering Infra #14144

Merged
merged 12 commits into from
Nov 30, 2018
Merged

Commits on Nov 30, 2018

  1. [Fizz] Add Flow/Jest/Rollup build infra

    Add a new package for react-stream which allows for custom server renderer
    outputs. I picked the name because it's a reasonable name but also
    because the npm name is currently owned by a friend of the project.
    
    The react-dom build has its own inlined server renderer under the
    name `react-dom/fizz`.
    
    There is also a noop renderer to be used for testing. At some point
    we might add a public one to test-renderer but for now I don't want to have
    to think about public API design for the tests.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    1d0f987 View commit details
    Browse the repository at this point in the history
  2. Add FormatConfig too

    We need to separate the format (DOM, React Native, etc) from the host
    running the server (Node, Browser, etc).
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    690e7de View commit details
    Browse the repository at this point in the history
  3. Basic wiring between Node, Noop and DOM configs

    The Node DOM API is pipeToNodeStream which accepts a writable stream.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    baa36b8 View commit details
    Browse the repository at this point in the history
  4. Merge host and format config in dynamic react-stream entry point

    Simpler API this way but also avoids having to fork the wrapper config.
    
    Fixes noop builds.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    dad379a View commit details
    Browse the repository at this point in the history
  5. Add setImmediate/Buffer globals to lint config

    Used by the server renderer
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    37b1031 View commit details
    Browse the repository at this point in the history
  6. Properly include fizz.node.js

    Also use forwarding to it from fizz.js in builds so that tests covers
    this.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    a155b17 View commit details
    Browse the repository at this point in the history
  7. Make react-stream private since we're not ready to publish

    or even name it yet
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    b0d61e3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    846e4a8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dc27a9b View commit details
    Browse the repository at this point in the history
  10. Add Fizz Browser host config

    This lets Fizz render to WHATWG streams. E.g. for rendering in a
    Service Worker.
    
    I added react-dom/unstable-fizz.browser as the entry point for this.
    
    Since we now have two configurations of DOM. I had to add another
    inlinedHostConfigs configuration called `dom-browser`. The reconciler
    treats this configuration the same as `dom`. For stream it checks
    against the ReactFizzHostConfigBrowser instead of the Node one.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    ed1ed67 View commit details
    Browse the repository at this point in the history
  11. Add Fizz Browser Fixture

    This is for testing server rendering - on the client.
    sebmarkbage committed Nov 30, 2018
    Configuration menu
    Copy the full SHA
    3d45ea1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b1182d1 View commit details
    Browse the repository at this point in the history