This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-22
Channels
- # admin-announcements (1)
- # aws-lambda (1)
- # beginners (38)
- # boot (48)
- # cider (11)
- # clara (4)
- # cljs-dev (61)
- # cljsrn (9)
- # clojure (68)
- # clojure-austin (3)
- # clojure-greece (9)
- # clojure-mexico (6)
- # clojure-russia (40)
- # clojure-spec (165)
- # clojure-uk (134)
- # clojurescript (37)
- # cursive (5)
- # datomic (25)
- # defnpodcast (2)
- # hoplon (1)
- # jobs (1)
- # juxt (1)
- # lein-figwheel (3)
- # leiningen (4)
- # mount (14)
- # off-topic (8)
- # om (29)
- # onyx (9)
- # protorepl (4)
- # quil (1)
- # re-frame (56)
- # reagent (3)
- # rethinkdb (1)
- # spacemacs (4)
- # specter (12)
- # test-check (2)
- # testing (1)
- # vim (12)
- # yada (4)
guys, it is possible to dispatch multiple events in one go?
@michael.heuberger: yep you're right, in that way you're dispatching to :a all the rest of the list
In those cases I usually make chains of dispatches (e.g. dispatching once and then dispatching everything else from that handler)
But I would say it depends on your use case
@michael.heuberger: can't be done. You have to use multiple dispatch
So this:
(dispatch [:a a])
(dispatch [:b b])
(dispatch [:c c])
Be careful of this:
(map dispatch [[:a a] [:b b] [:c c]])
The laziness of map
means nothing is done.
So use mapv
(not lazy) or perhaps more explicitly wrap in doall
to de-lazify the map
ah, good to know - thanks!
what would you think of supporting multiple events in re-frame?
or use doseq
@michael.heuberger: the new re-frame fx stuff will allow you to dispatch multiple events
oh, the next version?
But that’s more because fx need to be data structures
But if you’re doing function calls, a doseq
is more idiomatic clojure
yup, agree - all good, thx guys
If you are interested, you can track what's coming in the next version here: https://github.com/Day8/re-frame/blob/develop/CHANGES.md
It is a substantial release
Hi, if I want to inspect the current state of the db, could I do @re-frame.db/app-db?
I think you just write a sub called :app-db
and pass the db as is?
@rui.yang: here you go - https://github.com/Day8/re-frame/wiki/FAQ#5-how-can-i-inspect-app-db
I am inspecting it directly from figwheel, it gave me wield results, doesn’t seem to sync with the real state. from the Q/A above, seems that I shouldn’t use figwheel to do that 😞
@jjunior130: I inspected directly form figwheel repl, and the results it returned wasn’t synced with real state. that’s why I asked here. I was confused. From https://github.com/Day8/re-frame/wiki/FAQ#5-how-can-i-inspect-app-db, using figwheel to do is not recommended. I guess I have to use the workaround in the Q/A
I found that I had to kill all browser pages connecting to figwheel to make it work again
I’ll stick with it until next time I got stuck. I think this time it might because I have multiple tabs open
very rough but the infinite loop symbol seemed so fitting!
Oh, wow. You are talent!!
That looks great
It even has the dash between the re
and the frame
. So perfect.
I don't know how you did that. But if you have an svg version please create a PR (against develop) and put it in: https://github.com/Day8/re-frame/tree/develop/logo
Delete what is in there currently. Yours is so much better.
oh 😯 I'm flattered! ☺️
I can do a PR, I made it with Sketch, should I add the source file as well?
Yes please
And some pngs from it?
(I'm not a on a Mac)
Yes, I can add a few pngs and .sketch — I'll also add svg if that exports cleanly
Yes please
A reminder - this is the offical diagram describing the way re-frame works: http://thumbnails-visually.netdna-ssl.com/water-cycle_521f29b8b6271_w1500.png
Small heads up: In https://github.com/Day8/re-frame-http-fx It says "Add the following project dependency: Clojars invalid"
@curlyfry: I think that's because it's not yet deployed to Clojars
@curlyfry: I'll put it up there. But I'm a bit cautious. We haven't yet had enough chance to use it in the wild. So if you did want to use it, you might be slightly crash test dummy
We've written a few of these as a proof of concept for the new Effectful Handlers
Done.
re-frame-http-fx
amazing!
is (def-fx...)
already a thing in 0.8.0
? You guys are smart 😄
oh yeah I so dig this, and very very like the pluggability achieved with that fx
middleware
Chapeau
@richiardiandrea: def-fx
is available in alpha2
I'm sorry it is taking so long to get v0.8.0 through to release. It is partially feature creep, and partially that we actually want to exercise the new features before locking in.
@mikethompson: don't worry I am just asking...thanks for the hard work you do, I want to try the alpha but I am not quite there, I hope I can have soon some great 👍 confirming everything works
You may also be interested in: https://github.com/Day8/re-frame-async-flow-fx We're after feedback
yeah I read that, the feedback is like above: Chapeau! I think this is the missing piece of the framework, now it feels complete, I'll re-read the READMEs anyways and I will get back to you in case I find something
Note: this is a library. Is not even a part of re-frame itself. So variations and alternatives can abound.