angular/packages/core/test/resource
Alex Rickabaugh 18d8d44b1f feat(core): experimental resource() API for async dependencies (#58255)
Implement a new experimental API, called `resource()`. Resources are
asynchronous dependencies that are managed and delivered through the signal
graph. Resources are defined by their reactive request function and their
asynchronous loader, which retrieves the value of the resource for a given
request value. For example, a "current user" resource may retrieve data for
the current user, where the request function derives the API call to make
from a signal of the current user id.

Resources are represented by the `Resource<T>` type, which includes signals
for the resource's current value as well as its state. `WritableResource<T>`
extends that type to allow for local mutations of the resource through its
`value` signal (which is therefore two-way bindable).

PR Close #58255
2024-10-21 13:25:58 -07:00
..
BUILD.bazel feat(core): experimental resource() API for async dependencies (#58255) 2024-10-21 13:25:58 -07:00
resource_spec.ts feat(core): experimental resource() API for async dependencies (#58255) 2024-10-21 13:25:58 -07:00