Fork me on GitHub

got it. A few weeks ago React announced a lot of new features and it would be great to use them in cljs world. For example, useContext, useEffect, useImperativeMethods would be very useful. I think Reagent should do a lot of work to adapt to these React changes, but I’m not sure if it’s possible 😞


I actually have an experimental library that I’m working on as a way to essentially replace reagent with raw React + Hooks

👍 1

I have an open PR for additional syntax and convenience functions for using Hooks with it, but here’s a demo using the new Hooks API without all of that:


Thank you @U4YGF4NGM! I will investigate it. I think that using new approaches for building react components it’s a correct way. The last react features designed to improve app performance (time slicing, etc)


it’s not currently. reagent creates React classes. the new Hooks API only works in functional components


I actually think that React.lazy might be quite a bit easier, since it only relies on Suspense being enabled