State
Property | Description |
---|---|
product | Subscribe to product data available on PDP page |
products.wishlistIds | Subscribe to get wishlist product ids |
user | Subscribe to get user data |
theme.globalConfig | Subscribe to get theme global config applied in theme editor |
Example
FPI.state.product.subscribe(({ product }) => {
console.log(product.name)
});
FPI.state.products.wishlistIds.subscribe((data) => {
console.log(data)
});
FPI.state.user.subscribe((data) => {
console.log(data)
});
FPI.state.theme.globalConfig.subscribe((data) => {
console.log(data)
});