Gap
EPProductListProvider always fetches products client-side via useProductList. Unlike EPProductProvider (PDP), which accepts a pre-fetched product prop for the SSR hand-off, the list provider has no prop to accept a server-query result. Its full prop surface is Category ID, Search, Sort, Page Size, Preview State.
Consequence: a listing page cannot be server-rendered through the provider. Adding a ep.getProductList server query works (returns real products server-side) but there is nowhere to bind it — the provider ignores it and fetches in the browser regardless.
This is an unintended asymmetry with the PDP.
Expected
Add an advanced SSR hand-off prop to EPProductListProvider (e.g. initialProducts / products, mirroring EPProductProvider.product). When set, seed productGridData from it and skip the initial client fetch; pagination/sort refActions can still fetch subsequent pages. Leaving it empty preserves today's client-fetch behaviour.
Files
plasmicpkgs/commerce-providers/elastic-path/src/product-discovery/EPProductListProvider.tsx (props + registration)
plasmicpkgs/commerce-providers/elastic-path/src/product-discovery/use-product-list.tsx (accept seed data)
Notes
Gap
EPProductListProvideralways fetches products client-side viauseProductList. UnlikeEPProductProvider(PDP), which accepts a pre-fetchedproductprop for the SSR hand-off, the list provider has no prop to accept a server-query result. Its full prop surface is Category ID, Search, Sort, Page Size, Preview State.Consequence: a listing page cannot be server-rendered through the provider. Adding a
ep.getProductListserver query works (returns real products server-side) but there is nowhere to bind it — the provider ignores it and fetches in the browser regardless.This is an unintended asymmetry with the PDP.
Expected
Add an advanced SSR hand-off prop to
EPProductListProvider(e.g.initialProducts/products, mirroringEPProductProvider.product). When set, seedproductGridDatafrom it and skip the initial client fetch; pagination/sort refActions can still fetch subsequent pages. Leaving it empty preserves today's client-fetch behaviour.Files
plasmicpkgs/commerce-providers/elastic-path/src/product-discovery/EPProductListProvider.tsx(props + registration)plasmicpkgs/commerce-providers/elastic-path/src/product-discovery/use-product-list.tsx(accept seed data)Notes