fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
hadils 2021-05-21T00:32:34.019Z

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!

Jakub HolĂ˝ 2021-05-23T17:40:23.029Z

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 '_] .

wilkerlucio 2021-05-21T03:20:31.019100Z

to get on the component that uses it, add the singleton component query into the target component, for example:

wilkerlucio 2021-05-21T03:21:08.019300Z

:query [:thing/id :thing/title {[:singleton-thing "here"] [:client/secret]}]

hadils 2021-05-21T03:49:44.019500Z

Thanks @wilkerlucio!