This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-01
Channels
- # beginners (121)
- # boot (12)
- # cider (14)
- # clara (19)
- # cljsjs (1)
- # clojure (124)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-russia (47)
- # clojure-spec (20)
- # clojure-uk (7)
- # clojurescript (102)
- # cursive (16)
- # datomic (10)
- # emacs (2)
- # events (2)
- # immutant (3)
- # luminus (5)
- # lumo (33)
- # off-topic (2)
- # om (5)
- # onyx (22)
- # parinfer (1)
- # pedestal (32)
- # protorepl (1)
- # re-frame (6)
- # reagent (2)
- # ring-swagger (2)
- # rum (1)
- # spacemacs (8)
- # specter (17)
- # yada (1)
Yeah, I see what you mean.
I think my design pattern is to have helpers return data which can be composed into a new-fx response by the fx handler. (so not threading).
(defn qn-form-load-fx
[{:keys [db] :as ctx} [_ pk]]
(let [form (qn-form/init-questionnaire-form ctx pk)
req (qn-form/questionnaire-get ctx pk)]
{:db (assoc db :qn-form/form form
:page/loading true)
:ajax/get (assoc req
:handler [:init-questionnaire-form-response]
:error-handler [:ajax/error])}))
e.g. helpers in let then build responseThat should separate data/logic from app state management and behaviours
How come a data-structure is just fine when I inspect it at the REPL, but when I take
from it in a handler it renders a bunch of empty elements?
What @qqq is saying is that you might need to give us some more information for us to help you