Skip to main content

State

PropertyDescription
productSubscribe to product data available on PDP page
products.wishlistIdsSubscribe to get wishlist product ids
userSubscribe to get user data
theme.globalConfigSubscribe 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)
});

Was this section helpful?