State management
Many state components allow you to pass metadata to the component to control specific aspects of the component’s behavior. The PHP SDK allows you to pass that metadata through:
Every state operation allows passing metadata.
Passing one of them to a method or using the attribute allows you to define how the state store should handle conflicts.
Hardcoded key names are useful, but why not make state objects more reusable? When committing a transaction or saving an object to state, you can pass a prefix that is applied to every key in the object.