Skip to content

Commit d23dd70

Browse files
committed
update comment about source
1 parent 90d74c0 commit d23dd70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/routes/reference/basic-reactivity/create-resource.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ interface ResourceOptions<T, S = unknown> {
9292
- **Type:** `ResourceSource<S>`
9393
- **Default:** `undefined`
9494

95-
Reactive data source whose non-nullish and non-false values are passed to the fetcher.
96-
When the source changes, the fetcher is automatically re-run.
95+
Reactive data source whose value, when coerced to a boolean, determines whether the fetcher runs.
96+
If the value is truthy, it is passed as the first argument to the fetcher.
97+
If the value is falsy (including `undefined`, `null`, `false`, `0`, `""`, or `NaN`), the fetcher will not be called.
98+
Once the source changes to a truthy value, the fetcher automatically re-runs.
9799

98100
### `fetcher`
99101

0 commit comments

Comments
 (0)