This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-23
Channels
- # aws-lambda (1)
- # bangalore-clj (3)
- # beginners (80)
- # boot (8)
- # clojars (1)
- # clojure (200)
- # clojure-dev (37)
- # clojure-greece (26)
- # clojure-italy (11)
- # clojure-norway (3)
- # clojure-russia (14)
- # clojure-spec (21)
- # clojure-uk (30)
- # clojurescript (50)
- # core-logic (10)
- # core-matrix (1)
- # cursive (15)
- # data-science (21)
- # datomic (45)
- # devcards (2)
- # emacs (4)
- # fulcro (12)
- # garden (2)
- # jobs (5)
- # juxt (1)
- # lambdaisland (1)
- # leiningen (4)
- # luminus (20)
- # lumo (26)
- # off-topic (33)
- # onyx (27)
- # parinfer (1)
- # pedestal (3)
- # perun (5)
- # re-frame (20)
- # reagent (27)
- # ring (1)
- # ring-swagger (21)
- # shadow-cljs (259)
- # spacemacs (14)
- # yada (3)
I am not sure if this is because the request animation frame calls are lagging behind on mobile (another problem but might be related) or that re-frame imposes some overhead causing the text value to not get set correctly
Saw a claim in the SubscriptionFlow.md: “But this Signal graph must be without cycles, because cycles cause mayhem! re-frame achieves a unidirectional flow.” But I just created a cyclic subscription and it simply blew out the stack. Was there an implied “..as long as you do not do something daft.” in that claim?
New question. This works:
`(re-frame/reg-sub
::elapsed
(fn [query-v _]
[re-frame.db/app-db
(re-frame/subscribe [::time])])
(fn [[db now avg] _]
(- now (:start db) )))
` but I was hoping to use the :<- [sub-key]. Is there anyway I could have done that?btw, :start never changes so I do not need to subscribe.
I sent a PR (#423) to re-frame adding a global error handler to the interceptors chain via a new reg-event-error-handler
. It's useful for things like sending error details to an error service (sentry, errbit) with better granularity than window.onerror. Feedback would be appreciated. https://github.com/Day8/re-frame/pull/423
@hiskennyness re-frame doesn't check for cycles. That's up to you to get right.
It might be a good idea to have a [:start]
subscription, instead of directly obtaining from app-db
Remember this subscription (as you have written it) will run each time app-db
is changed. No matter what change is made to app-db
@nberger Thanks for that PR. Looks good to me. Daniel will have a further look at it today.
@royalaid you haven't given enough information for any specific comment. All I can do is to make the general comment that subscriptions are about delivering data to views, and views update on the next animation frame.
@mikethompson thanks for reviewing it. I'll add some documentation and respond to the review comments later
@mikethompson That's what I suspected re cyclic subscriptions, but the doc threw me. Javelin is the same but documents the consequences of cycles. No big deal, the doc so far is great. I am a noob, will look at tuning the subscription.
@mikethompson, sorry let me link you on this form