Fork me on GitHub
Oliver George01:05:16

Yeah, I see what you mean.

Oliver George03:05:30

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 response

Oliver George03:05:03

That 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?


Are we expected to debug this issue given only that information?


What @qqq is saying is that you might need to give us some more information for us to help you