This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-24
Channels
- # arachne (3)
- # beginners (39)
- # boot (3)
- # cider (91)
- # cljs-dev (56)
- # cljsrn (4)
- # clojure (267)
- # clojure-dusseldorf (1)
- # clojure-estonia (1)
- # clojure-greece (2)
- # clojure-italy (6)
- # clojure-nl (2)
- # clojure-russia (18)
- # clojure-spec (27)
- # clojure-uk (136)
- # clojurescript (19)
- # core-async (2)
- # cursive (6)
- # datomic (17)
- # emacs (2)
- # fulcro (86)
- # graphql (4)
- # hoplon (13)
- # jobs-discuss (7)
- # jobs-rus (1)
- # keechma (34)
- # keyboards (7)
- # leiningen (5)
- # luminus (4)
- # lumo (8)
- # off-topic (13)
- # om (6)
- # onyx (26)
- # re-frame (22)
- # reagent (1)
- # reitit (2)
- # remote-jobs (8)
- # ring (3)
- # ring-swagger (5)
- # rum (8)
- # shadow-cljs (45)
- # specter (6)
- # unrepl (16)
- # yada (15)
Is it okay to call a subscription from an event? Are there any issues in doing this?
@caleb.macdonaldblack https://github.com/Day8/re-frame/wiki/FAQ#1-why-cant-i-access-subscriptions-from-event-handlers
Ahh okay so an event and sub using the same function seems to be okay.
There is this issue I believe that had more discussion on the topic: https://github.com/Day8/re-frame/issues/255
I think it can get difficult, depending on your circumstance, to just extract functions in subs and use them in event handlers. Sometimes subs depend on other subs and the stack of dependencies to call that function become non-trivial, or result in having to call a chain of functions.
There is https://github.com/Day8/re-frame/blob/master/docs/FAQs/UseASubscriptionInAnEventHandler.md also on the topic
Which refers to re-frame-utils
that does have a cofx for the purpose of accessing a subs in an event handler.
@U0LK1552A Wow that is pretty much exactly what I need. The sub I’m using has input signals and is derived from multiple subs. Thanks!
Yea, I’m trying it out now. There is a performance caveat they mention that says: “Do not inject subscriptions unless they are also used in a component.“. This is fine though as we are using that subscription in a component.
re-frame 0.10.3 is out!: https://github.com/Day8/re-frame/releases/tag/v0.10.3
Following the re-frame release is a new re-frame-trace release. We've been working on this for quite a while, give it a spin! https://github.com/Day8/re-frame-trace/releases/tag/0.1.15
Has anyone else pressed the "factory reset" button in the new re-frame-trace yet? It got rid of the entire panel for me and I can't seem to get it back 😞
Ctrl +h should bring it back?
That did the trick, thanks!