Hello - I'd like to persist some data in Reflex and associate it with the currently-logged-in clerk user. I'm able to see clerk.ClerkState.user.id when I add it to an rx.Component, but cannot seem to retrieve it using clerk.ClerkState.user, which gives me a BaseVar, even if I trigger the code in an event handler (on on_submit handler of a rx.form.root element).
I suspect this is my lack of knowledge of how BaseVars work in Reflex, but I'm stumped on how to proceed. I'm able to access the realized (string) value of a sample BaseVar attribute in the State object where I'm trying to do all this, but don't know how to ask clerk.ClerkState to programmatically give me the user id of the logged-in user.
Hello - I'd like to persist some data in Reflex and associate it with the currently-logged-in
clerk
user. I'm able to seeclerk.ClerkState.user.id
when I add it to anrx.Component
, but cannot seem to retrieve it usingclerk.ClerkState.user
, which gives me aBaseVar
, even if I trigger the code in an event handler (onon_submit
handler of arx.form.root
element).I suspect this is my lack of knowledge of how
BaseVar
s work in Reflex, but I'm stumped on how to proceed. I'm able to access the realized (string) value of a sampleBaseVar
attribute in theState
object where I'm trying to do all this, but don't know how to askclerk.ClerkState
to programmatically give me the user id of the logged-in user.I'd really appreciate any pointers here.