This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-30
Channels
- # announcements (2)
- # bangalore-clj (6)
- # beginners (33)
- # cider (4)
- # clojure (9)
- # clojure-brasil (2)
- # clojure-spec (6)
- # clojurescript (36)
- # cursive (13)
- # datomic (3)
- # emacs (1)
- # fulcro (6)
- # graalvm (2)
- # interop (4)
- # luminus (1)
- # midje (1)
- # pathom (1)
- # random (1)
- # reagent (4)
- # shadow-cljs (11)
- # tools-deps (42)
- # xtdb (10)
quick question, any suggestions/best practices around using 3rd party js libs for API’s (e.g. a login/auth service like Cognito) I’m currently calling say (.signUp ..)
from one mutation, and have the then
and catch
call other mutations, but not sure this is the best approach
@eoliphant so, this isn’t a “best practice” answer because frankly I have no fucking clue (will have to wait for @tony.kay for that one), but it seems to me that it’s preferable to keep I/O out of mutations. You could treat Cognito as a remote, implementing it on the frontend, and passing the auth mutation to it
and then using the standard success/error pessismistic mutation callbacks (or just the ok/error handlers in fulcro 3)
@eoliphant totally agree with @hmaurer try to treat side effecting things as remotes. We did the same with for example localstorage