createSignal , createResource updates#1356
Conversation
|
|
❌ Deploy Preview for solid-docs failed. Why did it fail? →
|
|
Deploy preview failed for some reason |
|
Looks like someone already updated createComputed here |
amirhhashemi
left a comment
There was a problem hiding this comment.
One overall issue is that these reference pages don't strictly follow Diataxis. They include quite a bit of explanatory material and an explanatory tone. I've been spending a lot of time trying to ensure that at least the reference pages follow Diataxis more strictly. Honestly, I'm not sure it's worth the effort at this point. If improving Diataxis compliance isn't a goal of this PR, I'm perfectly fine with that.
amirhhashemi
left a comment
There was a problem hiding this comment.
I highly recommend running Prettier on these. There are a lot of formatting issues.
…ate createSignal page.
| Reactive data source whose non-nullish and non-false values are passed to the fetcher. | ||
| When the source changes, the fetcher is automatically re-run. |
There was a problem hiding this comment.
| Reactive data source whose non-nullish and non-false values are passed to the fetcher. | |
| When the source changes, the fetcher is automatically re-run. | |
| Reactive data source whose value, when not `undefined`, `null`, or `false`, is passed as the first argument to the fetcher. | |
| When the source changes, the fetcher automatically re-runs. |
I think "nullish" can be a bit confusing.
There was a problem hiding this comment.
But this is incorrect. 0 and "" are also false. Maybe try:
"Reactive data source whose value, when turned into a boolean is not false, will be passed as the first argument to the fetcher. If it is false, the fetcher will not be called. Values that become false include undefined, null, the number zero, and empty strings."
There was a problem hiding this comment.
Updated - let me know what you think of the rephrase.
There was a problem hiding this comment.
As far as I can tell from the code and my tests, only null, undefined, and false are not passed. Other falsy values like 0 and "" are still passed.
There was a problem hiding this comment.
I just noticed that when the source is null, undefined, or false, the fetcher does not get called at all. This might be better:
A reactive data source to be passed to the fetcher as its first argument. When its value is null, undefined, or false, the fetcher is not called. Otherwise, the fetcher re-runs whenever the source's value changes.
Co-authored-by: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com>
Co-authored-by: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com>
No description provided.