reagent

hifumi123 2023-02-23T10:05:03.013459Z

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.

πŸ‘€ 2
p-himik 2023-02-23T10:46:01.161679Z

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.

hifumi123 2023-02-23T10:53:30.064069Z

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

kennytilton 2023-02-23T13:57:33.314469Z

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.