Skip to content

Match form().pending to $effect.pending() #14656

@hyunbinseo

Description

@hyunbinseo

Describe the problem

I know runes are different and start with the $ sign.

Still, it seems weird that these basically do the same thing — returning pending promises/submissions as number — but have different syntax.

  • $effect.pending()
  • form().pending

When using await in components, the $effect.pending() rune tells you how many promises are pending in the current boundary

https://svelte.dev/docs/svelte/$effect#$effect.pending

/** The number of pending submissions */
get pending(): number;
<button disabled={!!modify.pending}>save changes</button>

https://svelte.dev/docs/kit/@sveltejs-kit#RemoteForm

Describe the proposed solution

Convert form().pending from a getter to a function so that it matches the stable Svelte 5 convention.

Alternatives considered

No response

Importance

nice to have

Additional Information

There wasn't much discussion on these PR and issue.

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