News for hackers. Stuff that matters.
Re:Migrating to React’s New Context API by bnchrch on Tuesday April 24, 2018 @07:40AM (#16911693)
I admire the spirit of the post but it seems contrived and hard to grok.

As soon as you go down the state and lifecycle method route my spidy senses start tingling.

I have yet to see an example on the new context api that wouldn't be clearer with stateless components + recompose. Perhaps someone could point me to the advantages?

Re:Migrating to React’s New Context API by the_imp on Tuesday April 24, 2018 @10:01AM (#16912624)
I wrote a small library [1] for localization messages using the new Context API; I'm pretty sure that any other base for it would have made its implementation significantly more complicated.

[1] https://www.npmjs.com/package/react-message-context

Re:Migrating to React’s New Context API by bbaumgar on Tuesday April 24, 2018 @08:11AM (#16911860)
The new context api isn't meant to replace stateless components and recompose [0], it's meant to be a more sound context API that lives almost exclusively in library code, replacing usage of the old context + (maybe) 5% more use cases.

[0] https://twitter.com/dan_abramov/status/984510107923963904

Re:Migrating to React’s New Context API by notheguyouthink on Tuesday April 24, 2018 @09:31AM (#16912388)
Can you briefly describe what you mean by recompose? I'm a backend dev tasked with writing some react, and what I'm using currently is redux+react, but that's about it. More information would be appreciated so I can research :)
Re:Migrating to React’s New Context API by Vinnl on Tuesday April 24, 2018 @09:58AM (#16912597)