Sign Up

Local Storage

Twidget provides a set of local storage commands that enable interaction with the browser’s localStorage API through a no-code interface. These commands are useful for storing, retrieving, and managing key-value data persistently within the current domain context.

Purpose

These commands abstract the native Web Storage API, allowing users to manage local storage without writing code. This is particularly useful for persisting state, caching responses, or saving user preferences across sessions.

Key Concepts

  • Local Storage Scope: All operations are scoped to the current domain.

  • Key-Value Structure: Data is stored and accessed using string keys.

  • Data Handling: Inputs are typed, and outputs are returned in text format where applicable.

Available Commands

  • Set Item: Saves a value under a specific key in local storage. Accepts any data type as the value.

  • Get Item: Retrieves a value by key and returns it as text.

  • Remove Item: Deletes the value associated with a given key.

  • Clear: Empties all entries in the current domain's local storage.

These commands offer a declarative way to manage local storage, making it easy to build stateful web apps within Twidget’s no-code environment.

Related Topics

Managing Files

Twidget offers a set of commands to manipulate files in your file store. Below are the descriptions and usage of each command to help you understand how to utilize them effectively. Get File. Retrieve a file via file path. Inputs: - `path`: The file path to retrieve the file from. Outputs: - `filena...

Variables

Variables are essential building blocks in Twidget that allow you to store and manipulate data dynamically within your no-code applications. They enable you to create flexible and interactive applications by holding values that can be changed and referenced throughout your workflow. Creating Variabl...

Error Handling

When building applications with Twidget, you may encounter situations where you need to handle errors gracefully to ensure your application runs smoothly. Twidget provides two powerful commands for error handling: `try-catch` and `throw-error`. This documentation will guide you on how to use these c...

Security

Twidget provides several built-in functions to enhance the security of your applications. Below is an overview of each security command, including its description, inputs, and outputs. Generate ID. Description: Generates a unique identifier. None - Type: Text Hash Text. Description: Hashes the provi...

Conditionals

Condition Command. The Condition Command allows you to perform actions based on whether an expression evaluates to true or false. You can nest other commands within the true or false branches of the condition, enabling complex logic flows. - Expression Builder: Validate two variables to equal true. ...