Use new Context API in React 16.3
See original GitHub issueThere’s a new render prop/children-as-function API for context that just came in React 16.3.0.
The big thing that’s relevant to us: It works across shouldComponentUpdate
boundaries without the need for subscriptions.
It will require some refactoring. And backward compatibility is going to be…interesting. We may have to drop backward compatibility to make the implementation clean. FWIW, React Router and React Redux is considering this too, so we’re not alone.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:18 (17 by maintainers)
Top Results From Across the Web
React v16.3.0: New lifecycles and context API
Version 16.3 introduces a new context API that is more efficient and supports both static type checking and deep updates.
Read more >New Context API in React 16.3.0 - Akash Verma - Medium
React 16.3.0 is out now and with this release React Team has released the much awaited new context API which is a complete...
Read more >React Context API: What is it and How it works?
Context API is a (kind of) new feature added in version 16.3 of React that allows one to share state across the entire...
Read more >Use new Context API in React 16.3 #5908 - GitHub
I have been toying with react-broadcast in my router so that I can mimic (sort of, the API isn't exactly the same) the...
Read more >New Context API in React 16.3 by Eric Kim - YouTube
Eric Kim: https://github.com/bosung90.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would prefer dropping support for React < 16.3 in 1.0.0. People will hate us, but they’ll need to effectively rewrite their app anyway when they update. Also, React 16.x is very stable, API-wise, so upgrading from React 16.0 to 16.3 to 16.x should be easy.
Regarding the metrics of the package: Didn’t look at that, missing issues and 1.4 kB overhead are a pretty big no-go.
@leMaik We will at least drop React < 16.0 support between 1.0.0-beta.x and 1.0.0. It’s a matter of timing. If the react team release React 17.0 in one year from now, I think that we can wait Material-UI 2.0.0 otherwise, as you say.