Fork me on GitHub
#fulcro
<
2019-05-13
>
exit219:05:27

How would I perform a load-action, after another load-action has returned and updated state? Or should I do that in a post-mutation?

currentoor19:05:50

@njj post-mutation is fine

tony.kay19:05:32

post mutations do not honor full mutations semantics @currentoor @njj At the moment you should use a regular load within a post mutation for chaining loads.

👍 2
tony.kay19:05:44

typically under a setTimeout of 0

tony.kay19:05:00

That will be fixed in Fulcro 3, but has been sort of a hard edge to date

exit219:05:21

I need to load from one resource and then load from another based on the response of the first

tony.kay19:05:33

(defmutation post-mutation [_]
  (action [{:keys [reconciler]}]
    (js/setTimeout (fn [] (df/load reconciler ...)) 0)))

exit219:05:46

Thanks that worked great