Fork me on GitHub
#reagent
<
2015-11-23
>
mpdairy03:11:03

I added pull-tx and q-tx to Posh today, which let you do pull requests and queries to get the state for your components

hkjels09:11:23

@mpdairy: Interesting, have you tried using your lib with Re-frame?

frankiesardo09:11:38

@mikethompson: yes! as-element did the trick. Now I can write [Column {:header (r/as-element [Cell [:img {:src ".."}]]}] and works perfectly, thank you

frankiesardo10:11:38

if anyone is curious this is a gist for fixed-data-table for version 0.6.0 https://gist.github.com/frankiesardo/17905c5ec26bfc84df7d

pepe10:11:02

@mpdairy: Posh looks very interesting! Thanks

mpdairy12:11:54

@hkjels: I don't know how re-frame works exactly, but I think the Posh functions pull-tx and q-tx are a lot like re-frame's subscriptions, except they can declaratively get data from the database. then the transactions in Posh are sort of like re-frame's events, and when-tx! could be used for event handling/transformation.

pepe12:11:51

@mpdairy: I have same feeling, not that I know too much about either of them 😉

mccraigmccraig13:11:39

@mpdairy @pepe : afaics pull-tx and q-tx return reactions , so they could be returned from re-frame subscriptions, and when-tx takes a handler-fn which could easily enough dispatch a re-frame event

mccraigmccraig13:11:35

so you could then look at replacing the default re-frame db with a DataScript db... my guess is that's going to be pretty easy too, though i know nothing about DataScript so it is only a guess

sreenath.n14:11:22

I was trying out re-frame and secretary (for routing). But, when I do (secretary/dispatch! "/users/gf3") it is not updating the URL. Any idea?

bostonaholic15:11:27

@sreenath.n: are you setting up the History object correctly?

(let [h (History.)]
  (goog.events/listen h EventType/NAVIGATE #(secretary/dispatch! (.-token %)))
  (doto h (.setEnabled true)))

bostonaholic15:11:13

and that needs to be evaluated before your call to secretary/dispatch!

sreenath.n15:11:28

Yes, I am. Infact I used, lein new re-frame <project-name> +routes to get the skelton

sreenath.n15:11:47

which add this boilerplate by default

sreenath.n15:11:33

Does anyone has a demo app to which I refer to?

bostonaholic15:11:35

you're using re-frame and this is the #C0620C0C8 room, maybe try #C073DKH9P

bostonaholic15:11:08

I know nothing about 1) re-frame 2) the project skeleton

sreenath.n15:11:22

Thanks @bostonaholic . I have posted there, now awaiting reply simple_smile