isPending
Returns true if any reactive read inside fn is showing a stale value
while newer async work is pending. Does not subscribe — pair with a tracked
memo if you want to react to pending status changes.
Useful for showing inline transition indicators alongside the previous
value (rather than swapping to a <Loading> fallback).
Because fn is read normally, isPending participates in Loading/SSR
readiness the same way the read itself would.
Import
import { isPending } from "solid-js";Type signature
function isPending(fn: () => any): boolean;Examples
const pending = createMemo(() => isPending(() => user()));
<button disabled={pending()}>{pending() ? "Saving…" : "Save"}</button>
<button disabled={isPending(() => user())}>Save</button>