Fork me on GitHub

random newb question: Does Reagent have a dev road map? Specifically, I'm curious what the plans are around React hooks and how they will impact future versions of Reagent.


there are projects that deal with hooks (hx i think it's called), as far as i know reagent won't be adding them at the moment cause it has much better ways of dealing with state also i heard suggestions to move reagent to native cljs implementation which i kinda like but we will see what happens 🙂


Currently it is hard to use them because Reagent implementation uses React classes (which are incompatible with hooks) and would require large rewrite to use functional components. And I'm not sure if this is possible without breaking existing apps & Reagent API.


A native CLJS implementation (removing the React dependency) would be cool.


Looking at hx and uix, my understanding is that hooks aren't very useful / don't work that well together with Cljs datastructures so it doesn't currently look that important to support them directly in Reagent. (I haven't followed developments very closely so I could have missed some changes.)

👍 4

Specifically, hooks don't currently allow controlling how the value comparison should work with Cljs immutable structures:, I think hx and uix implement some workarounds for this


Thanks @juhoteperi and @lepistane. Very helpful and informative.


FWIW that whole thread was FUD from our end. Hooks work great with CLJS immutable data


The same concerns we had with CLJS data, are also there for any JS collection (object, array) as well. By following React best practices, we get the same behavior as regular JS data (but with better APIs 😉 )


I may be missing some context here but isn't part of the point that CLJS data is better than regular JS data (i.e. immutable/persistent data structures)? It seems we would want something better than the behavior of regular JS data.