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

  1. Select the component where you want the instruction to be executed.

  2. Open the Uncodie Plugin and go to the components section.

  3. In actions, create a new action.

  4. Choose the event that will trigger the action and select the “setVariable” action.

  5. Select the variable you want to rewrite

  6. 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?