Store Value

This function is used to store key-value data to access later anywhere in the app.
Click to expand


storeValue(key: string, value: any, persist? = true): void


Argument Name



Name of the key to store the value against


Value to give the key you are creating/updating


Should this key value get persisted in the browser local storage to use between sessions. Defaults to true

Reading values

You can read values from the store by referencing the key inside the object

{{ }}


  • Persisted state is cleared out when a user logs out

  • Transient state (persist=false) is only available till the user exits the app or refreshes a page

  • If a same key is available in transient and persisted state, the transient value gets preference

  • Store value is sync. Unlike other Appsmith functions, you can read the effect of store value in the next line itself

    storeValue("userID", 42);
    console.log(; /* this will print 42 in the console */