-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Explain that props are updated on navigation #6915
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@matthewp - Is this example (in the same section, but just above what you added) still accurate? How are we making clear the distinction between a component's props vs its state? This change now updates island props upon navigation, so would this counter get set back to 5 by default? Can you make sure reading this entire section on state, that everything in it still makes sense? |
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 @matthewp !
I took some of the description from the language of the changeset in the implementation PR to provide a use-case, and to include the version it was introduced.
Please also read the entire section now that the default props behaviour has changed, and make sure the existing description here is still accurate, or whether mention of the new default behaviour might need to be corrected earlier, too!
@sarah11918 It might be a good idea to rename |
Co-authored-by: Sarah Rainsberger <[email protected]>
@sarah11918 reworded things just a little bit, let me know what you think? |
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.
Approved!
Description (required)
With withastro/astro#10136
transition:persist
is changing to update props upon navigation when used on an island. This explains that props will trigger a re-render.Related issues & labels (optional)
For Astro version:
4.5
. See astro PR #10136.