This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-29
Channels
- # announcements (2)
- # babashka (18)
- # beginners (42)
- # calva (56)
- # chlorine-clover (35)
- # clara (9)
- # clj-http (1)
- # clj-kondo (19)
- # cljs-dev (8)
- # clojure (14)
- # clojure-europe (23)
- # clojure-france (7)
- # clojure-norway (6)
- # clojure-uk (3)
- # clojurescript (37)
- # community-development (3)
- # cursive (29)
- # datomic (3)
- # emacs (10)
- # events (2)
- # fulcro (77)
- # hyperfiddle (2)
- # introduce-yourself (4)
- # joker (1)
- # lsp (40)
- # malli (52)
- # meander (7)
- # missionary (16)
- # off-topic (3)
- # pedestal (1)
- # re-frame (5)
- # reitit (38)
- # releases (1)
- # shadow-cljs (4)
- # tools-build (18)
- # tools-deps (1)
- # xtdb (8)
good morning, my google and clojars searches have come up empty so far: Anyone aware of a re-frame fx handler that deals with triggering a local download in the browser? Otherwise I’ll just go and wrap this: http://marianoguerra.org/posts/download-frontend-generated-data-to-a-file-with-clojurescript.html
i am experimenting with using a fork of re-frame as my server-side “framework” for a subset of my application, and I have been fairly successful in moving the request/response handling to reg-event-fx
and reg-fx
respectively. it’s actually forced me to change how i write a lot of stuff for the better: writing pure functions that are event data in, db/fx data out and then using the fx handlers to perform very simple side effects. I’ve run into a bit of a conundrum tho.
So far, my events haven’t relied on anything except the in-memory app-db, but now I’m converting request handler functions that make database calls and then perform modifications on the queried data. This makes it hard to write pure functions. I can’t figure out how to pass in the event vector to an interceptor so I can write one that will do my query, leaving the reg-event-fx
function pure.
is it possible to expose the event vector in an interceptor?
nevermind, i found the answer I had been looking for soon as I sent that, lol
context stores it in :coeffects
: https://day8.github.io/re-frame/Interceptors/#what-is-context