Skip to content

Use new Context API in React 16.3 #5901

Closed
@timdorr

Description

@timdorr

Re: facebook/react#11818 and reactjs/rfcs#2 (<- Warning: super long PR)

There's a new render prop/children-as-function API for context coming in the next React minor release. The big thing that's relevant to us: It works across shouldComponentUpdate boundaries without the need for subscriptions. So, no more need for the blocked updates guide. Huzzah!

It will require some refactoring. And backwards compat is going to be...interesting. We may have to bump to 5.0.0 to make it clean. FWIW, React Redux is considering this too, so we're not alone. (The whole major version/breaking changes debate is probably going to fire up again 🙄 )

I'm going to start tooling around with it over the weekend. The fun bit: turning on this and async rendering at the same time 😲

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