Fork me on GitHub
#re-frame
<
2017-04-08
>
aj taylor00:04:31

Does anyone have any experience using jest with clojurescript? Or could anyone point me into the direction of some info on it?

kenny00:04:46

What is the recommended approach to executing a side-effectful action and storing the result of that action in the state? It seems like the only way is to register a fx that does the side-effectful action and then dispatch'es an event with the return value. Example:

(rf/reg-fx
  :side-effecty
  (fn [x y z]
    (let [thing (do-my-side-effect! x y z)]
      (dispatch [:set-thing thing]))))
This method seems icky though. Is there another way to approach this problem that I'm missing?

kenny00:04:51

Maybe that is exactly the definition of a coeffect? ๐Ÿ™‚

kenny00:04:29

Yes, yes I believe it is ๐Ÿ‘Œ:skin-tone-2:

aj taylor00:04:46

I think youโ€™re right

kenny00:04:11

Typing out your problem often helps you find your solution ๐Ÿ˜†

eveko13:04:50

hello guys, how do i take apart a collection of subscribed collection? I am getting my feet wet with re-frame. I can pull a json collection of users from my java api, but how do manipulate members of the collection wich is mapped in my db as :data ? A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. this is the error i get in console when try this [:div "I actually loadeded some data" @data] the data loads fine cause i can view it in the repl (re-frame.db/app-db)

andrea.crotti15:04:34

You probably need to transform the json into a Clojure data structure @eveko ?

danielcompton23:04:14

@denik I've already filed a radar against Safari giving the re-com site as a test case