Fork me on GitHub
#re-frame
<
2015-08-31
>
gadfly36102:08:31

Just a heads up, added +garden profile to re-frame-template https://github.com/Day8/re-frame-template/

gadfly36102:08:45

If anyone is interested in making a +heroku profile, i'd be interested in a PR simple_smile

nidu18:08:26

Hello. Have anybody ever had a problem like this: you call (println foo) and get #<Reaction 20: nil>, then (right after) call (println @foo) and get No protocol method IDeref.-deref defined for type string: 518ecf36-6890-4a99-b48b-c6cc3de41a83?

nidu19:08:46

Turned out it happens when you pass a plain non-reaction arguments to dynamic subs

nidu19:08:09

Could you please correct me if i'm wrong. Generally we need dynamic subs only if we don't want to remount component with another arguments?

nidu20:08:32

@darwin thanks. Yeah, that's what i'm using right now. However i don't fully understand if we can achieve the same effect with simple subs. My guess is that when you remount component with simple sub - you simulate dynamic sub. I'm pretty sure it's not that easy but a bit confused at the moment. Probably just lost looking for a cause of the above issue.

darwin20:08:38

@nidu: yes, I would think that remounting component with a different static subscription should work

darwin20:08:03

remounting could be also causing parent component to render, effectively creating a child component from scratch

mikethompson22:08:31

@nidu: Regarding #108, dynamic subscription use will look like this: (subscribe [:todo-dynamic x y z] [a b c]) Where: x y z must be values a b c must be ratoms or reactions (values which change over time) You are creating a signal which has input signals a b c (plus app-db).

mikethompson22:08:03

And, yes, you can simulate a dynamic subscription by either: 1. destroying and recreating a Form2 component which has a static subscription 2. (as explained previously) storing the "dynamic values" within (a b c) within app-db itself which means app-db is the only input signal you need.