Skip to content

An equivalent of solid's isPending utility ($state.pending) #17011

@Thiagolino8

Description

@Thiagolino8

Describe the problem

Svelte has a way to tell if there are pending asynchronous derivations within the scope of a boundary with $effect.pending()
And it has a way to tell if a state is causing an asynchronous derivation with $state.eager(state) !== state
But it doesn't have a way to tell if a specific derived state is currently in an asynchronous derivation
Version 2 of Solid is bringing a utility to fulfil this function and it would be very useful to have an equivalent

Describe the proposed solution

A rune like $state.pending(state) which is an equivalent of $effect.pending() but instead of indicating asynchronous derivations within the nearest boundary indicates whether the state passed as a parameter is a derived state with a pending asynchronous derivation

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions