Fork me on GitHub
#re-frame
<
2023-06-20
>
kanwei21:06:42

Is there a way to write a sort of watcher function that does something when a value in the global state changes? For example, I have a bunch of filters for a UX, like {:filters {:verified true, :name "Hello"}}. I want to save the :filters to a database. Is there a way to do this without putting the save function in every reg-event function that modifies the filters?

p-himik21:06:15

Yes, a global interceptor.