Fork me on GitHub
#fulcro
<
2020-03-16
>
tvaughan23:03:58

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?