useCollectionContext
Returns the collection store from the nearest collection container.
Code examples
function CollectionItem() {
if (!store) {
throw new Error("CollectionItem must be wrapped in CollectionProvider");
}
// Use the store...
}
Follow updates
Join 1,000+ subscribers and receive monthly updates with the latest improvements on API Reference.