Set shared page state
by @pixiebrix
Set shared page state values and returns the updated state
How to Use
Shared page state can be used to pass data between extensions. Documentation for both getting and setting the page state can be found in the page state documentation.
You can add as many properties as you want to the ‘data’ field when it’s set to ‘object properties’, and add data to each of those properties to be retrieved later by the Get Shared Page State brick. You can also pass in a variable as the whole input instead of using object properties, but note that that will store the contents of that variable and not the variable itself. The ‘namespace’ field controls which blueprints can use this data, and the ‘mergeStrategy’ field controls how that data is added if there is already similar data being stored.
See the page state documentation for details on each of the options for these fields.
Examples
Inputs
Name | Required | Type | Description |
---|---|---|---|
data |
object
|
The data to set | |
namespace |
string
|
The namespace for the storage, to avoid conflicts. If set to blueprint and the extension is not part of a blueprint, defaults to shared | |
mergeStrategy |
string
|
Outputs
Name | Required | Type | Description |
---|---|---|---|
No outputs for this brick defined. |
Related tags
@pixiebrix/state/set
1.7.16
Aug. 17, 2021
June 21, 2022