Fork me on GitHub
#re-frame
<
2019-10-03
>
jiangts07:10:30

@danielcompton I saw you used metamorphic in re-frame-10x and then removed it. Any insight on what it’s good at / not good at? Curious since I’m considering using the library

danielcompton20:10:55

Hmm, trying to remember now. I think it was fine but maybe we didn’t need all of what it provided?

danielcompton20:10:29

I might have had trouble expressing the kinds of queries that I wanted to in metamorphic’s query language

tomaas08:10:52

hi, why doesn't re-frame template include accountant? How do you redirects?

andrea.crotti09:10:57

well you can still do it

andrea.crotti09:10:03

something like

(defn go-to-internal
  [place]
  (set! (.-hash js/location) place))
to move to things like "#section1"

andrea.crotti09:10:56

the proper way is probably https://developer.mozilla.org/en-US/docs/Web/API/Push_API though, which is what accountant uses I believe

p-himik13:10:40

@tomaas Take a look at https://github.com/ingesolvoll/kee-frame It worked out pretty good for me.

👍 8
p-himik13:10:21

From the name, it may seem as a replacement for re-frame. But it's just a library created to be used alongside with re-frame.

atticmaverick20:10:02

I'm a little confused with cofx. I want to use async-storage (similar to localstorage with react native. How am I supposed to provide a key that isnt static? from the documentation it's trivial to have a static value (inject-cofx :async-storage "key"). but when I want that "key" value to be an input to the handler how is that supposed to be done?

mafcocinco20:10:46

I think that is attainable via parameterized events. I'm a newb at re-frame but my understanding is that when you dispatch an event, you can pass a vector of pretty much whatever you want. The first item is the event keyword, but everything else in the vector is up to the event type. So, you could pass the key when you dispatch the event and (IIRC) the co-efx handler should have access to the event vector. But, again, I'm a newb so I could be wrong about this.

atticmaverick20:10:42

yeah I understand that. the issue is the cofx inject occurs before the input values. Maybe I can use interceptor? I will take a look at that