Skip to content

Commit

Permalink
Edits (#2145)
Browse files Browse the repository at this point in the history
  • Loading branch information
rennyG authored Sep 15, 2022
1 parent ccf86fa commit 2132616
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/hooks/framework/useflashsession.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ The `useFlashSession` hook is best used for form validation in the [`Form`](http

## Related framework topics

- [Forms](https://shopify.dev/api/hydrogen/components/framework/forms)
- [`Forms`](https://shopify.dev/api/hydrogen/components/framework/form)
- [Session management](https://shopify.dev/custom-storefronts/hydrogen/framework/sessions)
16 changes: 8 additions & 8 deletions docs/hooks/global/usedelay.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
gid: 2efaf024-c436-4d4e-9130-cf0b0c9cb843
title: delay
description: Add an artifical within server components
title: useDelay
description: Add an artificial delay within server components.
---

The `useDelay` hook adds an artificial delay within your server components. This is useful to debug timing issues, and to design fallback UI states at suspense boundaries.
The `useDelay` hook adds an artificial delay within your server components. This is useful to debug timing issues and to design fallback UI states at suspense boundaries.

> Note:
> All artificial delays are removed in production mode
> All artificial delays are removed in production.
## Example code

Expand Down Expand Up @@ -71,13 +71,13 @@ The `useDelay` hook takes the following arguments:
| Key | Required | Description |
| ------- | -------- | -------------------------------------------------------------- |
| `delay` | Yes | A unique string or the result of either `useQuery` or `useShopQuery`. |
| `time` | Yes | The amount of time in miliseconds to delay. |
| `time` | Yes | The amount of time in milliseconds to delay. |

## Return value

The `useDelay` hook returns the result of `useShopQuery` or `useQuery` after the specified delay.
The `useDelay` hook returns the result of either `useShopQuery` or `useQuery` after the specified delay.

## Related hooks

- [`useShopQuery`](https://shopify.dev/api/hydrogen/hooks/global/useshopquery)
- [`useQuery`](https://shopify.dev/api/hydrogen/hooks/global/usequery)
- [`useShopQuery`](/api/hydrogen/hooks/global/useshopquery)
- [`useQuery`](/api/hydrogen/hooks/global/usequery)

0 comments on commit 2132616

Please sign in to comment.