Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

$effect.pending flaky behaviour #17110

Open
@dylan1951

Description

@dylan1951

Describe the bug

Sometimes $effect.pending() doesn't work, I don't know the exact conditions but check out the repro below for an example.

Reproduction

REPL

<script>let value=$state(0);asyncfunctiondelayed(v) {awaitnewPromise(r=>setTimeout(r,1000));return v;}let slowSquare=$derived(awaitdelayed(value**2));</script><buttononclick={()=>value++}>Increment</button>{#if$effect.pending()}<p>Performing intensive mathematical calculations...</p>{:elseifvalue>=-1}<p>{value} ^ 2 = {slowSquare}</p>{/if}

Logs

System Info

svelte playground

Severity

blocking an upgrade

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp