Fork me on GitHub
#re-frame
<
2018-02-14
>
danielcompton00:02:43

@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

danielcompton00:02:28

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

danielcompton00:02:59

@gklijs can you see the request being sent or received?

danielcompton01:02:47

The big new feature is that when you travel back through your epochs, app-db follows it

danielcompton01:02:05

Interested in your feedback on this part

danielcompton01:02:45

Also a new timing panel:

gklijs04:02:14

@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.

jakob11:02:50

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?

manutter5112:02:46

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

manutter5112:02:36

Especially the /src/todomvc/events.cljs file.

manutter5112:02:04

There’s also an article about global interceptors in the FAQ: https://github.com/Day8/re-frame/blob/master/docs/FAQs/GlobalInterceptors.md

manuel13:02:38

@danielcompton trying the new version on 2 different projects today, thanks for the work!

danielcompton16:02:38

@manuel great!, be sure to use the newest release, I did one last night with a hotfix

kenny18:02:14

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.

danielcompton19:02:53

@kenny have you looked at it in re-frame-trace?

kenny19:02:04

Doing that right now actually 🙂

kenny19:02:42

This is my first time actually using re-frame-trace. Is there a way to view the event log?

kenny19:02:40

Figured it out. Trace tab, show: events, show all traces.

kenny19:02:01

This is really cool.

kenny19:02:29

What are these :raf, :raf-end, :reagent/quiescent?

mikerod19:02:05

@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

danielcompton20:02:48

Yep, raf and raf-end mark the beginning and end of an animation frame

danielcompton20:02:33

:reagent/quiescent is a synthetic trace we create when we detect that everything has finished rendering (an app may take multiple AFs to render)

danielcompton20:02:03

@kenny if you expand a trace and click on it, it dumps the whole trace to the console