Closed Offirmo closed 6 years ago
@Offirmo good call! So, ..., React had the old context api, and they'd always ask you nicely to not rely on it, promising that it's going to get better. Since then they have made several rfc's until they have gotten to a point where they were happy with what they got.
The new context API is already fully merged into React and published, as 16.3.0-alpha.0 to catch implementation issues. The official release will come out in a couple of days. They'll update the React docs for this as well, probably are working on it right now.
This library uses a small polyfill meanwhile (react-broadcast), so you can already use it. I have tested it against 16.3.0-alpha without and everything is working. I will remove the polyfill next week or whenever 16.3 actually drops.
That's good news! Please write a blog post!
@Offirmo that would be a first 😄got my worst grades in school for writing ...
PS. i've just released a new version under the next
tag that doesn't rely on react-broadcast any longer. Made a CSB for toying around as well: https://codesandbox.io/s/lxly45lvkl
Sorry to hijack this issue here but just to clarify: You are saying that this is pretty much production ready right?! 😁 If so this is great news for me ... for months I am looking for an excuse not to learn/use redux or mobx and stay true to the react core ... your awesome little library right here seems like the perfect fit! 😃 Well done mate!
@Twisterking sure, you can use it, it's production ready.
for months I am looking for an excuse not to learn/use redux or mobx and stay true to the react core
Yeah, it's a strange situation now. React now has this stuff covered out of the box. Just needed a little abstraction for ease of use.
would be great to link the official announcement in the readme : https://reactjs.org/blog/2018/03/29/react-v-16-3.html#official-context-api
@abenhamdine right, it's out now isn't it? I just came back from vacation and trying to keep up with everything. I'll add the link, take out react-broadcast and finally review the pr you've made (thanks for that!)
@drcmda yes it's totally stable and official in react 16.3
It's still brand new and unknown for many developers, so a sentence "What is React Context API ?" with the link to the official announcement would be a good idea IMHO
your project mentions the "Reacts new context API"
However, React doc has no mention of this.
It looks like a proposal, isn't it?
If yes, this is slightly misleading...