This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-22
Channels
- # announcements (13)
- # babashka (22)
- # beginners (22)
- # biff (17)
- # calva (6)
- # clerk (20)
- # clj-kondo (25)
- # clj-together (5)
- # clj-yaml (20)
- # cljdoc (16)
- # cljs-dev (1)
- # clojure (42)
- # clojure-brasil (1)
- # clojure-europe (26)
- # clojure-nl (6)
- # clojure-norway (24)
- # clojure-turkiye (3)
- # clojure-uk (5)
- # clojurescript (37)
- # core-async (7)
- # core-logic (2)
- # datalevin (7)
- # datomic (43)
- # events (2)
- # fulcro (7)
- # gratitude (1)
- # hyperfiddle (7)
- # java (7)
- # jobs (3)
- # lsp (4)
- # off-topic (16)
- # pathom (18)
- # polylith (1)
- # portal (27)
- # reitit (4)
- # releases (3)
- # shadow-cljs (47)
- # tools-build (14)
- # tools-deps (16)
- # yamlscript (11)
Anyone tracking RAD: I’m working on a new way of defining renderers. Starting with forms. I’m trying out multimethods with hierarchies, and it is looking pretty good to me so far. The API is NOT stable, so don’t use it in production yet, but I’d love some feedback. RAD version 1.6.0-SNAPSHOT, and the book has a new chapter: https://book.fulcrologic.com/RAD.html#MultimethodRender
Fascinating! I'll have a look
hi 🙂 Possibly silly question … I see how to use com.fulcrologic.fulcro.server.config
on the server side. Is there a way to make config values available to .cljs client code? …. And if config is available on the client side, would that expose secret values? Looking for an example
I like to add my "env"/"config" in a dataset
, usually on body
In fulcro code, somewhere around here
https://github.com/fulcrologic/fulcro-rad-demo/blob/main/src/shared/com/example/components/ring_middleware.clj#L28
you add [:body {:data-env (write-transit-str {:my-config :ok :my-secret "abc"})} ...
using:
(defn write-transit-str [x]
(str (with-open [out (ByteArrayOutputStream.)]
(t/write (t/writer out :json) x)
out)))
Then, on client init, you do (app/fulcro-app {:shared (-> document .-body .-datasetEnv read-transit-str)})

I usually just make a resolver. If it is private data I make it require a session. To avoid exposing real secret values I’ll make the resolver return just a “UI” portion of the config file. E.g.: in defaults.edn
{:ui/config {...}}
then in a resolver:
(defresolver ui-config-resolver [env input]
{::pc/output [:application/config]}
{:application/config (:ui/config config)})
and load that at startup