latest
Reads reactive expressions while bypassing any pending async overlay — i.e.
Always returns the most-recently-committed value, even when newer reads
inside fn are still in flight.
Useful inside a <Loading> boundary's children when you want to keep
showing the previous resolved data instead of the fallback while the next
value loads.
Import
import { latest } from "solid-js";Type signature
function latest<T>(fn: () => T): T;Examples
<Loading fallback={<Skeleton />}> {/* During a transition, render the previous user instead of skeleton: *\/} <UserCard user={latest(() => user())} /></Loading>