-
Notifications
You must be signed in to change notification settings - Fork 335
createSignal , createResource updates #1356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated - let me know what you think of the rephrase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Playground: https://playground.solidjs.com/anonymous/925f6243-cf68-496e-936b-3f3221b17cca
Co-authored-by: Amir Hossein Hashemi <[email protected]>
No description provided.