$ the-wire · showcase
Hydrogen adds ProductView and CollectionView standard events, templates follow
By RepoJournal · Filed · About Shopify · Composed from the cited sources · methodology
Hydrogen shipped two new view components for Standard Events and wired them into the React Router template and five examples, while a Next.js bump in the same repo carries a moderate cross-tenant disclosure advisory.
feat(hydrogen): add ProductView for the shopify:product:view event Shopify/hydrogen
Adds `ProductView`, a package API that fires the `shopify:product:view` Standard Event for products a storefront renders, built on `createViewEventElement` from the Standard Events module, the same primitive Shopify's Liquid themes use. This PR is the API only; nothing sends events until a storefront places the component.
feat(hydrogen): add CollectionView for the shopify:collection:view event Shopify/hydrogen
Adds `CollectionView`, which fires `shopify:collection:view` when a collection page shows and follows the same explicit-placement model as `ProductView`. The release notes frame the before state plainly: "Hydrogen has no way to send a collection view event."
feat(templates): send product view events in the template and examples Shopify/hydrogen
The React Router template and the Hydrogen, Next.js, Nuxt, SvelteKit, and Solid examples now send `shopify:product:view`: product pages are wrapped in `<ProductView context="page">` and each card in `<ProductView context="collection">`. Storefronts on the template pick up product view events without wiring them by hand.
feat(templates): send collection view events in the template and examples Shopify/hydrogen
The same template and examples wrap each collection's product grid in `<CollectionView collection={collection} productsCount={products.length}>`, completing the four-part sequence. Templates that had sent no collection view event now send one on every collection page.
chore(deps): bump next from 16.2.9 to 16.4.5 Shopify/hydrogen
Dependabot moved `next` from 16.2.9 to 16.4.5, and the 16.4.5 release notes list a moderate advisory for cross-tenant sensitive information disclosure in `use cache`, so projects on that range should take the bump rather than defer it.
Action items
- → Upgrade next to 16.4.5 in projects using `use cache` to pick up the cross-tenant disclosure fix Shopify/hydrogen [plan]