Skip to content

Binding in slotted compoment triggers reactive statements twice #5720

Closed
@zqianem

Description

@zqianem

Describe the bug
When a variable is bound to a slotted component, changing that variable within the slotted component causes any reactive statements inside the slotted component to trigger twice.

To Reproduce
https://svelte.dev/repl/df6fe28c60e84c26a141debf305ed114?version=3.30.0

Expected behavior
Pressing the "Update x" button should cause only one console.log call, which is what happens when the <Wrapper> is removed.

Severity
Low — can work around this by using a store instead of binding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions