Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
michenly committed May 24, 2024
1 parent 749b16d commit c0f9cbe
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ These are some of the most commonly used Hydrogen examples. Browse the folders i

| Example | Details |
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [B2B](/examples/b2b/) | Hydrogen example of a headless B2B store front |
| [B2B](/examples/b2b/) | Headless B2B store front |
| [Classic Remix](/examples/classic-remix/) | Using [Classic Remix Compiler](https://remix.run/docs/en/main/guides/vite#classic-remix-compiler-vs-remix-vite) rather than [Remix Vite](https://remix.run/docs/en/main/guides/vite). |
| [Custom Cart Method](/examples/custom-cart-method/) | How to implementation custom cart method by showing in-line product option edit in cart. |
| [Express](/examples/express/) | Hydrogen example using NodeJS [Express](https://expressjs.com/). |
| [Express](/examples/express/) | Using NodeJS [Express](https://expressjs.com/). |
| [Infinite Scroll](/examples/infinite-scroll/) | [Infinite scroll](https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#automatically-load-pages-on-scroll) within a product collection page using the [Pagination component](https://shopify.dev/docs/api/hydrogen/2024-01/components/pagination). |
| [Legacy Customer Account Flow](/examples/legacy-customer-account-flow/) | The legacy customer account flow made with [Storefront API](https://shopify.dev/docs/api/storefront). |
| [Multipass](/examples/multipass/) | Connect your existing third-party authentication method to Shopify’s customer accounts, so buyers can use a single login across multiple services. |
| [Metaobjects](/examples/metaobjects/) | How to use [metaobjects](https://help.shopify.com/en/manual/custom-data/metaobjects) as a Content Management System (CMS) for Hydrogen. |
| [Multipass](/examples/multipass/) | Connect your existing third-party authentication method to Shopify’s customer accounts, so buyers can use a single login across multiple services. |
| [Optimistic Cart UI](/examples/optimistic-cart-ui/) | How to optimistically remove a cart line item from the cart. |
| [Partytown](/examples/partytown/) | Lazy-loading [Google Tag Manager](https://support.google.com/tagmanager) using [Partytown](https://partytown.builder.io/).feature. |
| [Single Fetch](/examples/single-fetch/) | Using Remix's unstable [Single Fetch](https://remix.run/docs/en/main/guides/single-fetch) feature. |
| [Subscriptions](/examples/subscriptions/) | Implementation of [subscriptions](https://shopify.dev/docs/apps/selling-strategies/subscriptions) for Hydrogen. |
| [Third-party Queries and Caching](/examples/third-party-queries-caching/) | How to leverage Oxygen's sub-request caching when querying third-party GraphQL API in Hydrogen. |

|

## Install an example

Setup a new project example by using the `--template` CLI param:
Expand Down
14 changes: 14 additions & 0 deletions examples/single-fetch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Hydrogen example: Single Fetch

> [!NOTE]
> This example is based on Remix's unstable [Single Fetch](https://remix.run/docs/en/main/guides/single-fetch) feature.
This example is meant for early adopter to test out and prepare for [Remix v3 = React Router v7](https://remix.run/blog/incremental-path-to-react-19). Single Fetch will be the only fetching strategy for React Router v7.

## Install

Setup a new project with this example:

```bash
npm create @shopify/hydrogen@latest -- --template single-fetch
```

0 comments on commit c0f9cbe

Please sign in to comment.