Skip to content

Commit b41a2a8

Browse files
docs: Update use-resource.ts (QwikDev#6402)
* Update use-resource.ts Duplicates the text changes that were approved for the core readme in this PR: https://github.com/QwikDev/qwik/pull/6354/files
1 parent 41339fe commit b41a2a8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/qwik/src/core/use/use-resource.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ export interface ResourceOptions {
4949
*
5050
* The status can be one of the following:
5151
*
52-
* - 'pending' - the data is not yet available.
53-
* - 'resolved' - the data is available.
54-
* - 'rejected' - the data is not available due to an error or timeout.
52+
* - `pending` - the data is not yet available.
53+
* - `resolved` - the data is available.
54+
* - `rejected` - the data is not available due to an error or timeout.
55+
*
56+
* Avoid using a `try/catch` statement in `useResource$`. If you catch the error instead of passing
57+
* it, the resource status will never be `rejected`.
5558
*
5659
* ### Example
5760
*

0 commit comments

Comments
 (0)