Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Support new Context API #2

Open
@overlookmotel

Description

@overlookmotel

Hi.

Would it be difficult to support the newer Context API released in React 16.3?

As I'm sure you're aware, this module solves one of the big problems standing in the way of implementing a "userland" version of Suspense which works on the server side. But, as I see it, the complications around Context are a bit of deal-breaker at present. The new Context API is used by React Router, for example.

I guess the ideal would be to automatically propagate context from all providers higher up the tree into the sub-tree passed to renderToStaticMarkup(). Ideally the component implementing an error boundary shouldn't need to be aware what providers are in use higher up the tree.

I have no idea whether React exposes current contexts in some private property which can be hooked into.

I'd be very happy to help with this, but sounds like you understand the internals of React much better than me, so any pointers to where to start would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions