Fork me on GitHub
#re-frame
<
2018-03-27
>
fabrao00:03:58

Hello all, is that a bad idea using this? (rf/dispatch [:some-service @(rf/subscribe [:some-variable])) ?

fabrao00:03:46

Sorry about my dumb question, but if I change the value of :some-variable how does it influence dispatch?

danielcompton00:03:59

@fabrao is this inside a view function?

fabrao00:03:53

well, it´s in :on-click button, do I have to consider inside view?

danielcompton00:03:52

just checking it wasn't inside an event handler itself

danielcompton00:03:32

If that is itself within an on-click function, then the subscription won't be evaluated until the on-click function is called

danielcompton00:03:46

i.e. #(rf/dispatch [:some-service @(rf/subscribe [:some-variable]))

danielcompton00:03:08

I would recommend derefing into a let outside of your on-click handler

fabrao00:03:23

so, that´s I need, evaluate just when on-click been used

joost-diepenmaat12:03:45

Is there some batteries included library for doing remote subscriptions as described here? https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md

gklijs14:03:25

@joost-diepenmaat if you have a graphql endoint you could use re-graph, if not you could create a backand with lacinia-pedestal. What source do you want to connect to?

joost-diepenmaat14:03:29

Ah, that’s interesting, thanks. For various reasons I would like to be able to use a mixture of “classic” REST and graphql-like apis

scknkkrer14:03:31

Here is a basic but expert-ish question. I am documenting the re-frame in my main language. And If there is, what is the complete difference between db-event handlers and effects-event handlers ? Just calling side effects or is there any other differences ?

borkdude16:03:34

@joost-diepenmaat Do you use that make-reaction machinery in your Re-frame subscriptions?

borkdude16:03:08

Speaking of GraphQL, edge just got an upgrade as well: https://github.com/juxt/edge/tree/master/app

joost-diepenmaat16:03:33

Experimenting with that yes

genRaiy18:03:50

quick flexbox question …. looking at flex box there is a CSS property called flex-direction

genRaiy18:03:30

and I want column-reverse rather than the default column

genRaiy18:03:07

does anybody know how I achieve this with the re-com library?

genRaiy19:03:23

hmmm using [scroller :align :end .... has a similar effect but I lose the scroll bars

gregg23:03:25

Yep:

:style {:flex-flow "column-reverse nowrap"}

gregg23:03:51

You can't just set :flex-direction because re-com sets :flex-flow (which of course includes flex-direction) so you need to override that composite style

parrot 4
cjsauer23:03:15

Is there a way to close the re-frame 10x panel on mobile?