Fork me on GitHub

@andre i have in-frame re-frisk working nicely in a re-frame app, but the popup only shows the greeting, no data. any pointers?


@andre never mind, solved it. was using a relative path in :script-path.


Okay, a sanity check:


@mikethompson Any plans to for more documentation on re-frame subscriptions please? The description on the main doesn't match the new coolness in 0.8.0 as described in the, and the commentary in the suggested todomvc file isn't enough (for me at least). Something in the style of the new docs at would be great.


In particular, suppose one has a bunch of pre-0.8.0 subscriptions, that now all use the new reg-sub-raw; and they all wrap their return value in (reaction...). If one now uses the 0.8.0 reg-sub that does not return a ratom, is that generally ok? Does reg-sub automatically wrap the computation like before, watching the inputs for changes? But/and if reg-sub returns a regular value, then how do potential further nodes in the signal graph know when to update? etc etc.


@limist: I definitely think there needs to be some more documentation on subs, if nobody else tackles it before me then I will probably start working on them over the next few weeks.


@shaun-mahood Great to hear, thanks!


Another question: I'd like to have an interceptor that, once activated/registered somehow, is added to all event handlers in my application, without explicitly modifying those event handlers individually. e.g. imagine something like the debug interceptor but it only needs to be specified somewhere once, to start working app-wide (instead of tweaking a ton of individual event handlers). Is there a way to do that please?


@limist: I've not done this myself, but I believe that in the past the suggestion was to write your own wrapper function and use that instead of reg-event-db. If it doesn't work well for you it might be worth checking with @mikethompson once he's on to see if there's a better method. So something along the lines of

(defn reg-my-event-db [id db-handler]
      (re-frame/reg-event-db id my-interceptors db-handler))
Though that code hasn't been tested at all, so there might be some issues with it.


@shaun-mahood Yes thanks, saw that approach in the docs at I'm hoping there's a way to auto-inject an interceptor in all events without touching individual handlers, so it's easier to turn on/off some universal behavior, app-wide.


@limist: You can still turn on or off universal behavior from your function later on (or have your function do it contextually if that makes sense), but I'm not sure of a way that prevents having to touch the handlers at least once without wrapping or overriding the reg-event-db and similar functions.


Is there a way not to lose focus on input when state from subscription updates?


@limist I've gone with the wrapping approach, and it worked very well. I can turn on/off the universal behaviour from the wrapper function. Changing all the handlers to the new one didn't take too long.


@curlyfry Thanks for the tip, I'm willing to do it, it just seems so...heavy-handed. ๐Ÿ™‚ Especially when there must already be some built-in way to add extra interceptors on any/every event handler.


@sllyq: Do you have any example code showing the problem you're having?


@limist @curlyfry @shaun-mahood : I talked to @mikethompson about this issue recently and he said to hand roll a wrapper fn. Worked fine for me ๐Ÿ˜Š


@reefersleep Dang, I would've liked meta-burrito over regular-burrito. But so be it.


@limist: I think I know what you should name your wrapper function now ๐Ÿ™‚