Fork me on GitHub
#re-frame
<
2016-06-13
>
danielcompton01:06:44

@rui.yang: re-com was written with re-frame in mind, and by the same people

danielcompton01:06:04

That’s a good starting place. There are other reagent form libraries, but I don’t have much experience with them

seantempesta01:06:58

I was under the impression that child subscriptions did not re-run if the parent returned the same value, but that’s not what I’m seeing in my app. Any time a parent subscription runs, I’m seeing all dependent subscriptions run again. Am I missing something? I tried upgrading to Reagent 0.6.0-rc1 (thinking the switch from identical? to = might be the problem), but the behavior is still the same.

seantempesta01:06:22

ah, never mind. I just setup a contrived example to show it and I can’t reproduce it. I must be doing something wrong in my app.

seantempesta02:06:57

I think I found my problem. So if I have two separate components that are subscribed to the same subscription, the subscription will run twice? Is there any way to cache the result from the first subscription run and just send the value to all other subscribers?

danielcompton03:06:02

@seantempesta: Yep, it’s in master, but not in a released version of re-frame. https://github.com/Day8/re-frame/pull/124

seantempesta03:06:40

@danielcompton: oh cool! I’ll check it out.

danielcompton05:06:08

@rnandan273: feel free to ask about re-frame and datascript here

rnandan27305:06:15

thanks @danielcompton , did not know there was a channel for re-frame

danielcompton05:06:36

there’s a channel for everything here 🙂

rnandan27305:06:35

community is good , but jobs are scarce:worried:

rnandan27305:06:07

its difficult to convince people that more can be done with less code

rnandan27313:06:06

Has anybody used alandipart's local storage library as a backing db in re-frame?

escherize14:06:11

I know that lots of people use that.

escherize14:06:19

But I havn't

rnandan27318:06:05

I am trying to use alandipart's local storage library as a backing db in re-frame, but the reactions don't seem to get triggered

mccraigmccraig20:06:05

@rnandan273: do you see the updates if you evaluate @(re-frame.core/subscribe [:my-sub]) ?

rnandan27321:06:59

Thanks @danielcompton I got the local storage model working, I am saving and loading from local storage on demand and running the event flow from the in-memory hash map i.e the default behaviour

danielcompton21:06:33

So it's working?

symbit22:06:36

I'm trying to pass a param from the url that launches the re-com/re-frame SPA into the App (app.js). Is this possible?

darwin23:06:09

you can print it into EDN as a string, store in a js variable and then read it with clojurescript

darwin23:06:44

or convert it into JSON (if possible), assign it into a js var and then use it directly in JS

darwin23:06:19

or if profile is known during compilation time, you can bake it into cljs sources using a macro

darwin23:06:45

or if profile is simple/small, encode it into url parameters and then access those param(s) in cljs