API
function rxResource<T, R>( opts: RxResourceOptions<T, R> & { defaultValue: NoInfer<T> }, ): ResourceRef<T>; function rxResource<T, R>( opts: RxResourceOptions<T, R>, ): ResourceRef<T | undefined>;
function rxResource<T, R>(opts: RxResourceOptions<T, R> & { defaultValue: NoInfer<T>; }): ResourceRef<T>;
Like resource
but uses an RxJS based loader
which maps the request to an Observable
of the
resource's value.
@returns
ResourceRef<T>
function rxResource<T, R>(opts: RxResourceOptions<T, R>): ResourceRef<T | undefined>;
Like resource
but uses an RxJS based loader
which maps the request to an Observable
of the
resource's value.
@returns
ResourceRef<T | undefined>
Jump to details