-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[docs] Add clarification about reactivity and arrays #6547
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.
Makes sense, thank you! I would move the example what does and what doesnt trigger the update into the existing code block
Co-authored-by: Simon H <[email protected]>
I am not sure about moving it in the same block, I think keeping them separate avoids confusion because it makes the distinction betweeen the normal way and the special case |
Co-authored-by: Geoff Rich <[email protected]>
// this method call does not trigger an update | ||
arr.push(2); | ||
// this assignment will trigger an update | ||
// if the markup references `arr` |
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 wonder if this should go on the previous line? it's sort of a short line break. Probably fine either way though
Fixed the language following Ben's comment. |
Because this is a common recurring question, this PR adds a touch more information in regards to reactivity and arrays. More specifically the need for an assignment after array manipulation.
This is already covered in the tutorial, but it seems good to also include it as an example directly in the docs themselves.