Skip to content

best way to handle delayed fetch of data in a signal store? #4464

Answered by rainerhahnekamp
skyleguy asked this question in Q&A
Discussion options

You must be logged in to vote

I do it in the same way but with untracked. allowSignalWrites is going to vanish: angular/angular#56501

It is not a sin to use untracked btw. There is complete discussion of making it the default: angular/angular#56155

You could of course create a method with rxMethod and call that method via the init hook. That method would at the same time also do the fetching. But I am not sure if it brings that much in terms of readability.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@skyleguy
Comment options

@rainerhahnekamp
Comment options

@skyleguy
Comment options

@rainerhahnekamp
Comment options

@skyleguy
Comment options

Answer selected by skyleguy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants