-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: reactivityWork related to fine-grained reactivity in the core frameworkWork related to fine-grained reactivity in the core frameworkcross-cutting: signals
Milestone
Description
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
I'm experimenting now with the new resource and rxResource new APIs and one thing that is a bit hassle is that it adds undefined to the the type of it
for example I find myself needing a lot to do resource.value() ?? []
because before I was making the signal value empty array till the value is loaded
Proposed solution
is to add initial value to the ResourceOptions
points to be discussed
- if
hasValue()
should be true or false if it's the initial value - when
resource.reload()
is called if it should return to the default value or not
Alternatives considered
is to keep using ?? initialValue
sbarfurth, mauriziocescon, fmalcher, hensuu, michelAlexis and 1 more
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: reactivityWork related to fine-grained reactivity in the core frameworkWork related to fine-grained reactivity in the core frameworkcross-cutting: signals