Adopt Hydrogen incrementally
Some merchants might want to adopt the Hydrogen storefront incrementally. For example, they might want to keep the online store only for their product pages, but migrate all other traffic to their Hydrogen storefront.
You can proxy routes to the online store to direct traffic from certain pages back to the online store.
RequirementsAnchor link to section titled "Requirements"
LimitationsAnchor link to section titled "Limitations"
- Incremental adoption is supported only with Oxygen.
- Customer sessions can't be shared between the online store and the Hydrogen storefront.
Liquid carts and Storefront API carts are separate. You can't query a Liquid cart through the Storefront API, and you can't access a Storefront API cart through Liquid.
We plan to address this limitation in a future update. In the meantime, you can handle Liquid carts and Storefront API carts simultaneously. Learn how to share carts.
Proxy routes to the online storeAnchor link to section titled "Proxy routes to the online store"
You can proxy certain routes to the online store by adding a function to the
[handle].server.jsx file for the appropriate route.
For example, adding the following code to the
/src/routes/products/[handle].server.jsx file in your Hydrogen project proxies product page requests to the online store: