Stumped again. I have been trying to input a client secret from the server into my Fulcro app for several days now. I tried df/load!
and m/returning
with a data-only component that has a singleton ident. In the latter case, the data is loaded into the singleton component, but I do not know how to get it into the component that uses it. I can share some of the code if anyone has a suggestion as to what to do. Thanks!
You could also (df/load! :your-secret-resolver .... {:target (targeting/replace-at [:my-secret])})
to get top-level key :my-secret
in the client DB and use Link Query to get it from your component, such as [:my-secret '_]
.
to get on the component that uses it, add the singleton component query into the target component, for example:
:query [:thing/id :thing/title {[:singleton-thing "here"] [:client/secret]}]
Thanks @wilkerlucio!