Reactivity stops triggering · Issue #16294 · sveltejs/svelte · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Reactivity stops triggering #16294

Open
Open
@inzanez

Description

@inzanez

Describe the bug

Hi

I am not 100% sure if this is really a bug or if I am misinterpreting something here.
I had to create a REPL to reproduce the issue and I think that something with how reactivity triggers is not right.

The description within the REPL explains what happens in detail, but:
Using <button disabled={original?.name === to_edit.name}>click</button> stops re-evaluating under some circumstances.
Extracting this into a derived statement like:

let disabled = $derived(disabled={original?.name === to_edit.name});
<button {disabled}>click</button>

fixes things.

Reproduction

All in all it seems more complex, as even the use of the loading variable in Dialog.svelte changes the behavior (removing it from the disabled={loading || disabled} will fix things too).
And it also only appears to be the case for such nested components. If one changes all the <Button... components in the Dialog.svelte to <button> --> one level less nesting, reactivity works again.

https://svelte.dev/playground/87f3c3d1769d4236bc31b0d340462e50?version=5.35.0

Logs

System Info

System:
    OS: Linux 6.12 Void
    CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor
    Memory: 35.38 GB / 62.73 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.0 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 11.4.1 - /usr/bin/npm
    pnpm: 10.11.0 - /usr/bin/pnpm
  Browsers:
    Brave Browser: 137.1.79.126
    Chromium: 138.0.7204.92
  npmPackages:
    svelte: ^5.35.0 => 5.35.0

Severity

annoyance

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

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.