reagent

Drew Verlee 2025-01-23T22:05:14.489629Z

Is there any benefit to putting information inside a Reagent atom (a ratom) beyond managing rendering? For example, is there a reason to put a javascript object in a ratom if you don't intend on using it to cause react component re-renders? I feel like the answer is "no" but sometimes i'm short sighted.

p-himik 2025-01-23T22:09:22.797099Z

The answer is indeed "no".

p-himik 2025-01-23T22:10:42.665799Z

Well, there's also reagent.ratom/run! that lets you use data changes in ratoms to trigger side effects other than re-renderings.

Drew Verlee 2025-01-23T22:15:00.525939Z

Thanks p-himik. Your insights are always extremely useful to me. Hopefully one day i can pay you back!

p-himik 2025-01-23T22:16:15.923019Z

My pleasure. :)

🙏 2
Macroz 2025-01-24T06:22:42.548829Z

I'll hop in to say that I agree. @p-himik the value you provide in your answers is a great service to us all 👍

🙏 1