4 ms·
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 ting
by bnchrch 9y ago
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?
- bbaumgar 9y agoThe 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 https://twitter.com/dan_abramov/status/984510107923963904
- notheguyouthink 9y agoCan 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 :)
- Vinnl 9y agoIt's a library :) https://github.com/acdlite/recompose https://github.com/acdlite/recompose
- the_imp 9y agoI 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 https://www.npmjs.com/package/react-message-context