Here’s some example code you could follow of a similar scenario: app-codegen-demo/src/AppContextProvider.tsx at main · plasmicapp/app-codegen-demo · GitHub
Notice there is a setCurrentUser
which is being passed in as a global action.
Make sure to register the context too: app-codegen-demo/pages/plasmic-host.tsx at main · plasmicapp/app-codegen-demo · GitHub
Finally, setCurrentUser
would be available as a global action, which you can reference directly in interactions.