Collection Hooks
useCollection()
useCollection()
When you are on a /collections
template, any section, component, and or its children will have access to the page's data using the useCollection()
hook. That way, you do not have to drill this data down the props from the template.
useCollectionByHandle()
useCollectionByHandle()
Returns any collection
object from any route
Any .jsx file
useCollectionHandles()
useCollectionHandles()
Returns an array of all collection handles in your Storefront.
Any component on any route
Last updated