Fork me on GitHub

I have the namespaces buidler.mutations and buidler.ui. In the former, I require the latter so that I can make use of it when calling fs/add-form-config* in the mutation. I can't seem to get the quoted version of the mutation invocation to work in buidler.ui:

{:onClick #(and
                   ; (comp/transact! this [(save-note props)])
                   (comp/transact! this `[(buidler.mutations/save-note ~props)])
                   (mutations/set-value! this :note/text ""))
       :disabled (fs/invalid-spec? props :note/text)}
The commented version works when I use a require, but the quoted version gives me this in the console when I click to submit:
ERROR [com.fulcrologic.fulcro.mutations:247] - Unknown app state mutation. Have you required the file with your mutations? buidler.mutations/save-note


It seems that in buidler.ui you are not requiring buidler.mutations . But when you do you will get a circular dependency. I would not have the mutation depend on the UI. You can use the component registry to do this - break the recursion.


Excellent. Thanks!