-
-
Notifications
You must be signed in to change notification settings - Fork 523
docs: Add Signals tutorial with examples and hints in guide #1336
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: master
Are you sure you want to change the base?
docs: Add Signals tutorial with examples and hints in guide #1336
Conversation
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.
Thanks for doing this! I still need to read the tutorial page but this is a great start!
…ct-www into docs/add-signals-tab
| solvable: true | ||
| --- | ||
|
|
||
| # Signals |
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.
Not essential, but some more consistent line length in this document would be appreciated. Some lines wrap early, some go long; it's just a bit inconsistent when editing.
| parts of the UI that actually uses them. A signal remembers its value and automatically tracks where it is used, so when the value | ||
| changes, only the parts that depend on it will update. | ||
|
|
||
| ### Creating a signal |
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 feel like a lot of this content should be copy/pasted from the Signals guide page or intro blog. It looks like you wrote this entirely yourself, which is impressive, but the language and examples diverge quite a bit despite containing similar information.
Don't have time to review more right now, but I can take a look at this myself at some point.
Added a new tutorial to highlight Signals as a concept in and of itself, so everybody going through it will understand how they work and differ from hooks.
I have sprinkled a few hints about signals across a couple of pages (Essentials ⤵ Forms, Refs sections, etc.) in the guide as well, so users are reminded how something of the same effect as documented can be achieved via signals too, this swiftly follows "Signals" example tabs inserted right alongside Classes and Hooks.
Related to #1281