This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-16
Channels
- # autochrome-github (17)
- # aws (6)
- # babashka (19)
- # beginners (42)
- # bristol-clojurians (1)
- # calva (1)
- # cider (7)
- # clara (1)
- # clj-kondo (6)
- # cljdoc (9)
- # cljs-dev (5)
- # clojars (23)
- # clojure (93)
- # clojure-europe (20)
- # clojure-italy (28)
- # clojure-nl (13)
- # clojure-sanfrancisco (1)
- # clojure-uk (50)
- # clojuredesign-podcast (5)
- # clojurescript (90)
- # core-async (8)
- # datomic (23)
- # duct (3)
- # emacs (10)
- # figwheel-main (1)
- # fulcro (1)
- # malli (1)
- # meander (22)
- # off-topic (12)
- # pathom (57)
- # reitit (4)
- # remote-jobs (5)
- # shadow-cljs (5)
- # sql (8)
- # tools-deps (3)
I'm calling load!
in one component like {:onClick (fn [] (load! this [:team/name name] Team {:target [:team-list/id :team-list :team-list/selected-team]}))}
which should update a property in another component.
Everything is correct when I look at the request and response on the network.
I'm getting the error react_devtools_backend.js:6 ERROR [com.fulcrologic.fulcro.algorithms.tx-processing:549] - The result-action mutation handler for mutation com.fulcrologic.fulcro.data-fetch/internal-load! threw an exception. Error: Vector's key for assoc must be a number.
The other component looks something like:
(defsc TeamList
[this {:keys [by-attr/resp team-list/selected-team] :as props}]
{:query [{:by-attr/resp (get-query TeamName)} :team-list/selected-team]
:ident (fn [] [:team-list/id :team-list])
:componentDidMount (fn [this] (load! this [:list/by-attr :team/name] TeamNames {:target (get-ident this)}))
:route-segment ["teams"]
:initial-state {:team-list/selected-team {}}}
When I look at the DB Explorer in Fulcro Inspect I see an empty selected team. Oddly after the load! call above the selected team disappears from the state map.
What am I doing wrong?