re-frame

Franklin 2023-10-01T17:50:58.537949Z

Hello šŸ‘‹ I've defined an event as follows in a re-frame app

(re-frame/reg-event-fx
 ::fetch-ona
 (fn [{:keys [db]}]
   (js/console.log "test")
   {:db (assoc-in  db [:dataview-charts :saved-charts-loading?] true),
    :http-xhrio
    {:method :get,
     :uri "",
     :format (ajax/json-request-format),
     :response-format (ajax/json-response-format {:keywords? true}),
     :on-success [::successful-fetch-saved-charts-response],
     :on-failure [::failed-fetch-saved-charts-response]}}))

Franklin 2023-10-01T17:51:11.205089Z

For some reason when I dispatch this event, the HTTP request isn't made

Franklin 2023-10-01T17:51:31.668649Z

I'm not sure what I'm missing..

Franklin 2023-10-01T17:56:33.539889Z

nvm, I found that I didn't add a require for [day8.re-frame.http-fx] facepalm

2023-10-03T16:47:18.588949Z

Did you get any warnings about missing an effect handler for that? I’d think so, but I forget.

Franklin 2023-10-06T09:31:27.803789Z

I might not have seen them if there were any