Fork me on GitHub
#re-frame
<
2024-01-04
>
Jacob Emcken17:01:47

I am wondering if it considered "bad practice" or a "code smell", when having an event that dispatches another event?

p-himik17:01:30

As long as you do it via :dispatch or some other effect and not via rf/dispatch or some other function, it's alright.

Jacob Emcken17:01:15

Nice... then I think I am on the right track. Thanks 🙏

👍 1
jahson19:01:12

One common misconception that I would like to clarify is that subs and events are not functions, even though they may look like them. This misunderstanding sometimes makes you want to fire event from another event. I’m not sure about current version, but in older versions this might’ve introduce slight delays between events. But if it’s not the case and you sure, then it’s alright, like @U2FRKM4TW said.

👍 1