React Storefront
|

AmpState

import AmpState from 'react-storefront/amp/AmpState'

A container that initialize amp state to be consumed by child components. Components that support AMP functionality like QuantitySelector and TapPanel must be inside an AmpState element.

Props

NameTypeDefaultDescription
initialStateobject{}

The initial values for the amp-state. Defaults to {}

idstring'moovAmpState'

An id for the root amp state object. Defaults to "moovAmpState".