This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-14
Channels
- # beginners (19)
- # boot (11)
- # cider (59)
- # cljs-dev (292)
- # cljsrn (2)
- # clojure (121)
- # clojure-brasil (19)
- # clojure-canada (2)
- # clojure-france (2)
- # clojure-italy (57)
- # clojure-spec (54)
- # clojure-uk (20)
- # clojurescript (83)
- # core-async (20)
- # cursive (5)
- # datascript (2)
- # datomic (10)
- # duct (25)
- # editors (4)
- # emacs (2)
- # fulcro (5)
- # funcool (1)
- # graphql (2)
- # immutant (8)
- # java (1)
- # jobs (4)
- # jvm (1)
- # keechma (5)
- # luminus (10)
- # off-topic (113)
- # om (36)
- # onyx (11)
- # parinfer (55)
- # pedestal (7)
- # protorepl (28)
- # re-frame (25)
- # reagent (6)
- # ring-swagger (1)
- # shadow-cljs (113)
- # spacemacs (1)
- # specter (23)
- # unrepl (8)
- # yada (8)
@gklijs the thing to watch out with string/property naming is that under advanced compilation, the Closure compiler renames object properties to be shorter. Because it has an understanding of the whole program it can do this safely. However if you have code that is accessing properties by string, then the compiler can't understand this, and so those property accesses will break
Typically we only have advanced compilation issues when interacting with third-party JavaScript, I'd be surprised if there was an issue in a pure CLJS library
@gklijs can you see the request being sent or received?
re-frame-trace 0.1.20 is out now https://github.com/Day8/re-frame-trace/releases/tag/0.1.20
The big new feature is that when you travel back through your epochs, app-db follows it
Interested in your feedback on this part
Also a new timing panel:
@danielcompton will try out the new feature today, and thanks for the suggestion, I didn't see any request, and the setting up of re-graph still happened with a string value, so might be what's going wrong. Easy enough to check if the URLs are there with advanced compilation.
Hi! Me and @christopher want to sync our db with localstorage. We were thinking the best way to do that would be with a middleware. I see that it's possible to configure a middleware per eventhandler, but is there a way to configure a middleware for ALL event handlers?
Hi @karl.jakob.lind! I’d recommend you start by looking at the todomvc example that comes with re-frame, https://github.com/Day8/re-frame/tree/master/examples/todomvc
Especially the /src/todomvc/events.cljs
file.
There’s also an article about global interceptors in the FAQ: https://github.com/Day8/re-frame/blob/master/docs/FAQs/GlobalInterceptors.md
@danielcompton trying the new version on 2 different projects today, thanks for the work!
@manuel great!, be sure to use the newest release, I did one last night with a hotfix
I have an interesting problem. One of my subscriptions returns a value using a case
with the expression in the case
using the value from an input signal. As you know when a value does not match in a case
, case
throws an exception. This subscription is getting passed nil
for the input signal which causes the case
to throw. The odd part here is that the signal is only nil
when the subscription is not being used by any components. The component using the subscription is not re-rendered because it has already been unmounted. I'm guessing there is some sort of race condition happening here. i.e. The component has not been unmounted yet so re-frame reruns the subscription graph. While running the subscription graph, the component is unmounted.
I could add an else clause to the case
which simply ignores when a value does not match but that means I no longer get an exception thrown when an actual value I care about does not match. I could also add a clause which watches for exactly nil
but that seems like a bit of a hack.
@kenny have you looked at it in re-frame-trace?
This is my first time actually using re-frame-trace. Is there a way to view the event log?
@kenny I’d guess “raf” means “request animation frame” relating to https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame Reagent uses that I believe to perform updates
Yep, raf and raf-end mark the beginning and end of an animation frame
:reagent/quiescent is a synthetic trace we create when we detect that everything has finished rendering (an app may take multiple AFs to render)
@kenny if you expand a trace and click on it, it dumps the whole trace to the console