Like ResourceOptions
but uses an RxJS-based loader
.
API
interface RxResourceOptions<T, R> extends Omit<ResourceOptions<T, R>, 'loader'> {}
loader
(params: ResourceLoaderParams<R>) => Observable<T>
request
(() => R) | undefined
A reactive function which determines the request to be made. Whenever the request changes, the loader will be triggered to fetch a new value for the resource.
If a request function isn't provided, the loader won't rerun unless the resource is reloaded.
equal
ValueEqualityFn<T> | undefined
Equality function used to compare the return value of the loader.
Jump to details