Fork me on GitHub
#reagent
<
2023-02-23
>
hifumi12310:02:03

If I am making heavy use of JS react libraries like MUI and react-dnd, and making increasing use of hooks, is sticking with reagent really worth it? I recall seeing something like function components in reagent being slower than the class-based components, but my app is still in a state where refactoring reagent into something else (e.g. helix) is doable ratoms feel pretty redundant in light of hooks like useState — but semantics wise, I know hooks are annoying compared to ratoms. And in general I’m a bit lost on whether it’d be a mistake to continue using reagent in light of heavy JS interop and increasing hook usage.

👀 4
p-himik10:02:01

Reagent without atoms/reactions makes little sense. You can switch to Helix or something similar and, if you end up craving atoms, that existing code should be easy enough to simply include in a Reagent app. After all, Reagent can work with React components just fine.

hifumi12310:02:30

Well, I use plenty of ratoms until something from JS world forces me into hooks, which in case I use function components where I can use hooks and ratoms. But if I continue doing this (i.e. using JS react components that simply require hooks), then I wonder whether ratoms become redundant in light of hooks like useState

kennytilton13:02:33

In another context, I was not crazy about working on an app where they mixed ratoms and re-frame subscriptions et al together. One trick I use in situations like this is to take a backup 🙂 and dive into the refactoring. In about an hour I know if it was a bad or great idea.