This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-22
Channels
- # 100-days-of-code (1)
- # adventofcode (21)
- # announcements (2)
- # beginners (44)
- # calva (1)
- # cider (2)
- # cljdoc (16)
- # cljs-dev (70)
- # cljsrn (29)
- # clojure (66)
- # clojure-austria (1)
- # clojure-europe (4)
- # clojure-finland (1)
- # clojure-hamburg (1)
- # clojure-italy (24)
- # clojure-nl (3)
- # clojure-uk (127)
- # clojurescript (30)
- # core-typed (3)
- # cursive (34)
- # data-science (2)
- # datomic (16)
- # duct (17)
- # editors (1)
- # emacs (4)
- # figwheel-main (4)
- # fulcro (40)
- # hoplon (2)
- # instaparse (5)
- # kaocha (4)
- # leiningen (1)
- # luminus (4)
- # nrepl (46)
- # off-topic (5)
- # onyx (2)
- # other-languages (55)
- # parinfer (3)
- # protorepl (4)
- # re-frame (33)
- # reagent (6)
- # reitit (13)
- # ring-swagger (5)
- # shadow-cljs (26)
- # spacemacs (4)
- # sql (8)
- # testing (27)
- # tools-deps (21)
- # yada (1)
Hi all, I've written a wide ranging blog post centred on why use re-frame: https://juxt.pro/blog/posts/cljs-apps.html
thanks! it was really interesting reading
looking forward to your library for comparing devcard output with reference images
Can someone recommend me a good example project so i can see the folder structure and how everything is glued together?
Oh, nice, i just found a lot of examples here: https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
@mateus.pimentel.w Where did you get that image from?
@urzds, woops, i forgot to paste link too. I just edited the original message with it
I'll add a link to it in the docs
@lucio those views of yours seem very stateful which is something to be avoided if possible. I haven't used them, but the ExternalResources document lists form libraries.
Why do I not get arity exceptions when I register subscriptions or events with wrong-arity handler functions? Is that some re-frame magic?
@devurandom js runtime magic
ClojureScript is a little more vague about arity than Clojure, I think.
(vague is a better description than magic in this case)
Is there a way to turn that off?
And what are the side-effects of that?
In our code base almost no handler function had the correct arity...
why does it matter? are you concerned it might result in bugs?
Bugs or performance penalty or something like that.
I would guess that some part of the runtime has to invest time to fix our arity at runtime?
@devurandom i think it comes down to a feature of the js runtime - e.g. f=function(a,b){return [a,b];} ; [f(1,2,3) , f(1)]
causes no error in js
hm,k then
yeah, it would cost performance to be strict about arity; Javascript doesn't care.
Ah, OK, I thought it would cost something to bring the arguments of a function into shape. Pushing arguments to or popping them from the stack or so. With additional if conditions that one would not need, if one had strict arity.
The re-frame docs talk about the subscription part being a graph that is only build up once someone subscribes at the end. Is there also a mechanism to propagate the need for data backwards from the end? I.e. if some part subscribes to something and that is again subscribed to something else, to make this chain end at some part that says "hey, my job is to fetch data from the network, and people require my services, I'll go to work right away"?
Something to make re-frame subscriptions be able to subscribe to GraphQL subscriptions at the end of the chain maybe?
Even re-graph dispatches "subscription" events, instead of offering actual re-frame subscriptions. That seems quite backwards.
Is there any way of figuring out whether something is subscribed to a subscription? An event that is dispatched when a subscription comes to life for the first time?