You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Attachments passed to a component will run again if we use a destructured derived somewhere in the props lifecycle, even if their references didn't actually change.
Reproduction
For example, in the following code, I'm trying to add a property to my props if the button is hovered; In this simple scenario, this is solely done to cause the derived to run again.
What you will notice is that every time the button is hovered, even though the Attachment's reference didn't actually change, the code inside it keeps running again and again. I know that "otherRestProps" object's reference is changing, but shouldn't the attachment only run again if its own reference or any state inside of it changes?
Describe the bug
The Attachments passed to a component will run again if we use a destructured derived somewhere in the props lifecycle, even if their references didn't actually change.
Reproduction
For example, in the following code, I'm trying to add a property to my props if the button is hovered; In this simple scenario, this is solely done to cause the derived to run again.
+page.svelte
AttachmentTest.svelte
What you will notice is that every time the button is hovered, even though the Attachment's reference didn't actually change, the code inside it keeps running again and again. I know that "otherRestProps" object's reference is changing, but shouldn't the attachment only run again if its own reference or any state inside of it changes?
The Svelte version: [email protected]
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: