This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-23
Channels
- # announcements (1)
- # architecture (20)
- # babashka (30)
- # beginners (79)
- # calva (27)
- # cider (8)
- # clj-kondo (1)
- # clojure (125)
- # clojure-australia (1)
- # clojure-berlin (4)
- # clojure-europe (62)
- # clojure-france (1)
- # clojure-italy (6)
- # clojure-nl (4)
- # clojure-uk (12)
- # clojuredesign-podcast (5)
- # clojurescript (28)
- # core-async (31)
- # cursive (14)
- # datomic (47)
- # defnpodcast (1)
- # emacs (7)
- # figwheel-main (2)
- # fulcro (10)
- # graalvm (1)
- # graphql (11)
- # jobs-discuss (8)
- # leiningen (2)
- # off-topic (23)
- # rdf (9)
- # re-frame (3)
- # reagent (1)
- # reitit (5)
- # reveal (12)
- # shadow-cljs (12)
- # spacemacs (1)
- # tools-deps (87)
- # vim (22)
- # xtdb (21)
When handling a remote error I have a use case where I want to reset the app state to before the action.
I noticed there is no state-before-action
in the env map passed to error-action
- it is only available in the remote
section - I am passing it to the error-action by swapping it into the fulcro app runtime atom. Is this just an oversight, that the state-before-action
is not available in the error-action
handler?
@danvingo just an oversight…the logic for that is in the http://book.fulcrologic.com/#_result_action default result action. Just look at the code, it is very simple once you read that part of the book. I’d accept a PR, and you can also just override the built-in one with one patched to your needs.
I don't know if this is a bug or not, but I've been trying to get past an issue for a while now to no avail.
If I have a defrouter
set up to point to some component test
I run into an issue.
test
's initial state has one component that it grabs initial state from, X.
test
grabs the initial state of X
twice with two different sets of static data. call the sets S1
and S1
.
In test
's body, if I call the factory ui-x
on S1
and S2
then S2
's result is copied into S1
.
to be more specific, whatever data I passed into X
for S1
is essentially overridden and instead of test
's body displaying S1
and S2
it just displays S2
twice. (the maps passed into the body look identical).
I have found that the issues goes away if I switch the :query
from [... {:test/S1 (comp/get-query X)...}
to [... :test/S1 ...]
.
I will write up an example gist tomorrow, but if anyone recognizes a potential cause in the meantime help would be appreciated.
I’m running into an issue with pessimistic transactions — I’m calling
(comp/transact! this [(a) (b)] {:optimistic? false})
But b
never gets called …
I added debug logging at the end of a
on the server, and in its ok-action / error-action
but my logging at the beginning of b is never triggered..
If i re-order them, both get called — anyone run into anything similar before?
Sorry, not using which aspects? Optimistic: false?