Fork me on GitHub
#re-frame
<
2015-10-06
>
mikethompson07:10:45

@escherize: yes, I certainly remembering trying to understand Flux when working on re-frame, so it would have had some influence for sure. But I seem to remember that Flux was a bit different back then -- it has evolved a bit, I think. Certainly it is better documented now 😉 But how much of an influence it had on re-frame I just don't remember. I seem to remember that the notion of subscribe came to me when reading the OM advanced tutorial. Other stuff came from Elm (pre their official Architecture docs). Other stuff from pedistal-app It is a dog's breakfast of influences but Flux was in there. simple_smile

escherize07:10:04

I just watched the ny om next talk, some interesting stuff there too.

escherize07:10:26

Interesting to see David's evaluation of relay/falcor.

gadfly36107:10:17

@escherize do you still have the link to the talk?

escherize07:10:31

Yeah, let me grab it

escherize07:10:58

I was looking for it for a while on youtube

escherize07:10:04

> its not on youtube

bbss08:10:13

I think re-frame is more like redux which is said to be "not flux".

mikethompson08:10:52

As I understand it, redux post-dates re-frame.

bbss08:10:45

Yeah, could well be the inspiration as the author quotes figwheel working so well as his motivations for making react hot reload

gadfly36108:10:12

At first glance, seems like redux took quite a bit from Elm

shaym09:10:45

i was able to pinpoint the source of the endless subscription loop , to the use of klang.macros , specifically this code :

shaym09:10:35

if the klng debug line is uncommented the code goes into an endless loop of triggering either the subscription or the internal function

shaym09:10:48

still not sure why this happnes

shaun-mahood14:10:26

@shaym: No wonder it was so hard to track down. Yikes.

shaym20:10:25

in one of my handlers app-state (first arg) is [object Object] has anayone seen something similar ?

shaym20:10:41

Uncaught Error: No protocol method IAssociative.-assoc defined for type object: [object Object]

ivanbokii20:10:32

hey guys, lets say I have a subscription to which I pass an argument and then use this argument to get data from a store and build reactions from it. Is it possible to trigger subscription if the value of this argument changes (lets say parent component passes something to a child one, which subscribes to something passing the argument)?

shaym20:10:04

ivanbokii: i think you will need to resubscribe in this case

shaym20:10:47

ivanbokii: you can place the arg in the db , and then create the reaction based on the arg in the db , and then update the value in the db

shaym20:10:22

use a handler to update the are in the db

ivanbokii20:10:46

@shaym thanks, this is exactly what I'm doing at the moment

ivanbokii20:10:56

thought it'd be nice to ask if there is a different approach

shaym20:10:12

ivanbokii: i think that is the better designed option

ivanbokii20:10:30

@shaym doesn't it make you fill your storage with intermediate results

squest20:10:42

Probably this is the 1000th time you guys heard this, but I love re-frame! simple_smile

ivanbokii20:10:31

@shaym it's like you need to save something just because it's used as a parameter in queries, but does not represent any value in terms of data

shaym21:10:49

ivanbokii: true , but you can also do it via a resubscribe , but i havent used that option yet

shaym21:10:32

here is my handler

shaym21:10:48

and here is the result of it getting triggered

shaym21:10:07

the assoc-in is actually an assoc , which results in Error: No protocol method IAssociative.-assoc defined for type object: [object Object]

shaym21:10:30

im sure its something simple that im missing , but i cant see it

shaym21:10:02

yey figured it out !!! , a previous handler was breaking the state

ivanbokii21:10:06

@danielcompton: yes, exactly! Is it going to be merged any time soon?

danielcompton21:10:41

bit busy with other things at the moment, though there’s nothing stopping you checking out the branch and installing it yourself

ivanbokii21:10:02

that's nice, thank you