use Attributeshook
hook
Returns the proposed attributes
applied to the checkout.
Anchor to useAttributesuse Attributes()
use Attributes()
[] | undefined
UseAttributesGeneratedType
Returns the proposed `attributes` applied to the checkout.
Attribute[] | undefined
export function useAttributes<
ID extends RenderExtensionPoint = RenderExtensionPoint,
>(): Attribute[] | undefined {
return useSubscription(useApi<ID>().attributes);
}
Attribute
- key
The key for the attribute.
string
- value
The value for the attribute.
string
export interface Attribute {
/**
* The key for the attribute.
*/
key: string;
/**
* The value for the attribute.
*/
value: string;
}
Was this section helpful?