fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Timofey Sitnikov 2021-07-03T21:59:28.372300Z

Hello Clojurians, have a question. I have a button that when user clicks, the back-end mutation can take a long time to respond because it sends an email. Basically button fires up a mutation. Is there a utility in (defsc ... by which I can know that the current (defsc... is busy waiting on mutation?

tony.kay 2021-07-03T22:39:50.372400Z

The most direct way to handle that (if you really want to block) is to put a marker in state (relative to that components…e.g. [:component id :ui/sending?] . In your mutation’s optimistic action, set it to true, and in the ok-action and error-action set it back to false.

😀 1