News for hackers. Stuff that matters.
Re:Preact, a fast 3k React alternative by terrortrain on Thursday January 28, 2016 @05:33PM (#10991974)
Thats a good thing.

Context is not a good feature, and even the developers didn't want to write documentation for it because they didn't want people to use it. https://github.com/facebook/react/issues/580

Re:Preact, a fast 3k React alternative by acjohnson55 on Thursday January 28, 2016 @11:32PM (#10993514)
As people adopt external state containers, like Flux and Redux, it becomes increasingly impractical to bucket brigade chunks of data and callbacks to the leaves of the component tree via props. Some sort of delivery mechanism that doesn't couple in intermediate components is pretty critical to avoid having to maintain an unbounded amount of glue code. Context isn't without its kinks, but it's pretty useful in cutting boilerplate and decoupling components. The one thing I don't buy is that it's somehow worse than props from an architectural perspective (it's often compared to global variables, which makes little sense to me).
Re:Preact, a fast 3k React alternative by zbyte64 on Thursday January 28, 2016 @08:22PM (#10992851)
Then how would something like react-redux work without context?
Re:Preact, a fast 3k React alternative by boubiyeah on Friday January 29, 2016 @02:57AM (#10994075)
It can already work without contexts. You just pass a store instance via props.

I don't like contexts either :(

Re:Preact, a fast 3k React alternative by developit on Friday January 29, 2016 @07:38PM (#10999775)
Yup. I've successfully added contexts to Preact, but I still am not 100% sold on the value. Thankfully, simply supporting them doesn't add much bloat.