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 c95bab9 commit 90e5a49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ These are some of the most commonly used Hydrogen examples. Browse the folders i
| [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. |

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 90e5a49

Please sign in to comment.