Set Variable
Dynamic variable setting
Overview
You can trigger an action in uncodie for changing or setting the value of a variable in any context of your application
Setup
Select the component where you want the instruction to be executed.
Open the Uncodie Plugin and go to the components section.
In actions, create a new action.
Choose the event that will trigger the action and select the “setVariable” action.
Select the variable you want to rewrite
Select the value you want to set to the variable
Use Cases
Storing contextual data and states
Use variables to store different states for your application without calling a mutation for your DB
UX
Modify the app visibility state by declaring new variable states and forcing a re-render in the component's visual logics
Passing parameters
Store data to use it as a parameter for other scripts, queries, or actions in the Plugin
Last updated
Was this helpful?