re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
beders 2021-04-13T19:52:11.177400Z

Hello there, I’m staring at a re-frame codebase at the moment that has dozens and dozens of injected-subscriptions in various reg-event-fx Would you consider this an anti-pattern? I can understand where the desire comes from: there’s already code massaging the app-db to deliver data in a specific form. Repeating that in the event handler seems like a lot of code-duplication. The flip-side would be to add a battery of named fns that can also act as layer-3 subs and refer to those in an event handler. How are you dealing with this?

p-himik 2021-04-13T19:54:03.177500Z

> to add a battery of named fns that can also act as layer-3 subs and refer to those in an event handler Exactly this.

p-himik 2021-04-13T19:56:51.177700Z

Not entirely related, but my app-db is split into two parts - domain data and app's state. The latter I query with a bunch of get-in calls, usually wrapped in appropriately named functions. The former I query with a single function, because the data is normalized.

beders 2021-04-13T20:04:40.177900Z

thank you