This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-16
Channels
- # adventofcode (1)
- # announcements (16)
- # babashka (7)
- # beginners (77)
- # calva (31)
- # cider (18)
- # clj-commons (16)
- # cljfx (5)
- # clojars (5)
- # clojure (33)
- # clojure-europe (15)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (4)
- # clojurescript (1)
- # conjure (1)
- # core-logic (7)
- # cursive (16)
- # data-science (4)
- # datalevin (6)
- # emacs (20)
- # events (5)
- # fulcro (15)
- # holy-lambda (1)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (30)
- # luminus (3)
- # malli (3)
- # membrane-term (19)
- # missionary (62)
- # off-topic (39)
- # pathom (24)
- # polylith (5)
- # portal (9)
- # practicalli (3)
- # re-frame (16)
- # reagent (5)
- # remote-jobs (1)
- # reveal (21)
- # rewrite-clj (8)
- # shadow-cljs (13)
- # spacemacs (23)
- # sql (12)
- # timbre (2)
- # tools-deps (1)
- # xtdb (4)
the re-frame way would be to dispatch an event which would return an effect map with the fx
Hello, does anyone have an idea about this? https://github.com/den1k/re-frame-utils/issues/13
I have left a comment in the issue. tl;dr: the initial assumption is incorrect - injecting a sub was never supposed to dispatch anythign.
@U2FRKM4TW Thanks for your answer but are you sure we're talking about the same thing? your answer doesn't make sense to me. In the issue I'm talking about track, not inject.
https://github.com/den1k/re-frame-utils/blob/master/src/vimsical/re_frame/fx/track.cljc
Oh shoot, you're right! I managed to get stuck at reading "track" as "inject", my bad. Probably because I've seen re-frame-utils
being mentioned before only in the context of injecting sub values into event handlers.
no worries!
Is it customary to put all reg-fx
in 1 file? The re-com lein template has events
and subs
files. Is there usually a effects
file?
I don't. I put them in different files. For example, if I had some effects for downloading a document, i would have a namespace called document
and an effect named ::download
in that namespace.
The namespaces and namespaced keywords give more meaning to the effects. Using a namespaced keyword in the ns effects
seems pretty meaningless.
I wouldn't stick too hard to any such practices. If you feel that something belongs at some particular place, just put it there. But you have to make sure you understand the repercussions. With just one fx.cljs
or whatever, you just have to include it once anywhere and forget about it. With multiple files - you have to include them all somewhere or include them on the need-to-know basis, but as mentioned above qualified keywords help with this. I myself like the latter approach - I also do the same with subscriptions and events.
Hi, I have a function that returns a SVGSVGElement - how can I add this to my re-frame app? I get the error Error: Objects are not valid as a React child (found: [object SVGSVGElement])
That's more a #reagent question.
Create a form-3 component, attach a ref to e.g. a plain :div
in its :reagent-render
, and use that ref to add that SVG as its child in :component-did-mount
.
Looking for feedback on a new library for integrating with clj-statecharts. Made a basic use case example in the readme, would be happy for any comments 🙂 https://github.com/ingesolvoll/re-statecharts