-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update
useAsset
to better support Suspense on Next.js
Co-authored-by: Justin Walsh <contact.me@thejustinwalsh.com>
- Loading branch information
1 parent
34e08ff
commit de99be6
Showing
3 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface AssetRetryOptions | ||
{ | ||
/** @description The maximum number of retries allowed before we give up on loading this asset. */ | ||
maxRetries?: number | ||
|
||
/** @description Whether to try loading this asset again if it fails. */ | ||
retryOnFailure?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface AssetRetryState | ||
{ | ||
error: Error | ||
retries: number | ||
} |