This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-18
Channels
- # bangalore-clj (1)
- # beginners (36)
- # boot (119)
- # braid-chat (16)
- # cider (14)
- # cljs-dev (34)
- # cljsrn (7)
- # clojars (9)
- # clojure (91)
- # clojure-austin (1)
- # clojure-bangladesh (1)
- # clojure-dusseldorf (5)
- # clojure-israel (1)
- # clojure-russia (3)
- # clojure-spec (6)
- # clojure-uk (7)
- # clojurescript (11)
- # community-development (1)
- # core-async (5)
- # cursive (6)
- # datomic (11)
- # dirac (12)
- # funcool (24)
- # leiningen (5)
- # luminus (5)
- # off-topic (2)
- # om (69)
- # om-next (16)
- # overtone (4)
- # perun (19)
- # re-frame (23)
- # reagent (38)
- # specter (7)
- # uncomplicate (9)
- # yada (4)
@yury.solovyov: Saw your conversation with @mikethompson in #reagent, I should be available off and on to help today if you run into any more problems.
thanks, really appreciate it.
@shaun-mahood how should I perform setting initial state? via action dispatch ?
also, classic question: where to put async logic (io/ajax)
in event handlers?
@yury.solovyov i just use dispatch-sync to set up the initial state, before doing anything else
yeah, that's ok I guess
but where do you put the logic that requires some async stuff?
I can imagine a case where some event that need to go on server, or perform io, is split in 2 parts: say, before fetch and after fetch
I can set up a channel where I put "requests", dispatch event to start async stuff, and when It is finished I dispatch one more event with result that updates the state
does that makes sense?
@yury.solovyov: best resource is probably the "Populating your Application Data" section of the docs https://github.com/Day8/re-frame/blob/master/docs/README.md
See if that helps and ask anything that isn't clear still.
@shaun-mahood I don't get the thing about returning map as description of the effects, what shape should it have?
oh, I'm starting to get it with https://github.com/Day8/re-frame/blob/master/docs/EffectfulHandlers.md
@shaun-mahood how do I write -fx compliant API so that it can handle keys from returned map?
ok, it is here https://github.com/Day8/re-frame/blob/master/docs/Effects.md#extensible-side-effects
@yury.solovyov: Glad the docs are helping :) There'a a lot to figure out in there and I'm pretty sure there are some parts that aren't quite done yet, so keep asking as you run into things.
hope it is not too noizy
Definitely not too noisy, keep up the questions :)
I kinda have a mixed feelings about this: this is either very smart and cool stuff or it is overengineered, maybe cause I'm a beginner
The effects and coeffects are pretty new, you can do without them if they are unnecessary - I think they're great but I was also able to build things without them.
But it certainly doesn't hurt to get exposure to other ways to build things and see what clicks for you and for your needs.