Fork me on GitHub
#re-frame
<
2020-12-01
>
Mikko Koski10:12:49

I want to use local-store and use cofx similar to this (https://github.com/day8/re-frame/blob/master/docs/Coeffects.md#another-example-of-reg-cofx) But how do I do inject-cofx with a dynamic key?

Mikko Koski10:12:23

The key is user-id + something, and the user-id is loaded later

Mikko Koski10:12:40

After the user-id is loaded, it's stored to DB

p-himik11:12:59

:db is a key in coeffects.

p-himik11:12:35

So if your user-id is already in app-db, then you can just extract it from the coeffects in the interceptor.

Mikko Koski11:12:01

Riight, makes sense, thanks @U2FRKM4TW

dotemacs13:12:22

Hi, just in case that you weren’t aware of it, reclojure conf will be held this Friday and prior to it there will be a free re-frame workshop. Thanks https://clojurians.slack.com/archives/C03RZRRMP/p1606828591215400

🎉 12