resourceRefToPromise
U
Converts a resource reference into a promise that resolves when loading completes, or rejects if the resource errors.
This is useful when you need to compose resource loading with promise-based workflows.
Delayed Fake Resource
This demo uses fake resources backed by signals and delayed with setTimeout. Run both success and error cases to see how resourceRefToPromise behaves.
Current delay: 1200ms
Promise status
idle
isLoading: false
value: (none)
error: (none)
Await result
No result yet