Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

WishlistAlert container

The WishlistAlert container displays notifications that give feedback about actions performed in a wishlist drop-in component.

Wishlist container

WishlistAlert container

Configurations

The WishlistAlert container provides the following configuration options:

Options Type Req? Description
actionstringYes Specifies the action to notify the user about. Valid values are: "add", "remove", "move", "addError" and "removeError.
itemobjectYes The wishlist item where the action is performed.
routeToWishliststringNo Specifies the URL to show when the wishlist has products.

Example

The following example demonstrates how to render the WishlistAlert container:

provider.render(Wishlist, {
action: 'add', // or 'remove', 'move', 'addError', 'removeError'
item: { product: { name: 'Sample Product' } },
routeToWishlist: '/wishlist',
});