refactor(core): use stream in rxResource instead of loader#59910
refactor(core): use stream in rxResource instead of loader#59910cexbrayat wants to merge 1 commit intoangular:mainfrom
Conversation
d54029f to
56895b2
Compare
thePunderWoman
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
With the changes in angular#59573, `resource` can now define a `stream` rather than a `loader`. In the same PR, `rxResource` was updated to leverage this new functionality to handle multiple responses from the underlying observable, rather than just the first one as it was previously. This commit renames the `loader` option of `rxResource` into `stream` to be better aligned with its new behavior. The previous version is temporarily kept and marked as deprecated to help migrating the current usage. Before ``` usersResource = rxResource({ request: () => ..., loader: ({ request }) => ... }); ``` After ``` usersResource = rxResource({ request: () => ..., stream: ({ request }) => ... }); ```
56895b2 to
ee18be2
Compare
mmalerba
left a comment
There was a problem hiding this comment.
reviewed-for: public-api
|
This PR was merged into the repository by commit 98a584c. The changes were merged into the following branches: main, 19.2.x |
With the changes in #59573, `resource` can now define a `stream` rather than a `loader`. In the same PR, `rxResource` was updated to leverage this new functionality to handle multiple responses from the underlying observable, rather than just the first one as it was previously. This commit renames the `loader` option of `rxResource` into `stream` to be better aligned with its new behavior. The previous version is temporarily kept and marked as deprecated to help migrating the current usage. Before ``` usersResource = rxResource({ request: () => ..., loader: ({ request }) => ... }); ``` After ``` usersResource = rxResource({ request: () => ..., stream: ({ request }) => ... }); ``` PR Close #59910
…ngular#59910)" This reverts commit 98a584c.
|
We had to revert the change since it introduced a breakage inside g3. (the |
|
Thanks for the feedback @JeanMeche |
|
Alex picked up that change with others in #60919. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
With the changes in #59573,
resourcecan now define astreamrather than aloader. In the same PR,rxResourcewas updated to leverage this new functionality to handle multiple responses from the underlying observable, rather than just the first one as it was previously.What is the new behavior?
This commit renames the
loaderoption ofrxResourceintostreamto be better aligned with its new behavior.The previous version is temporarily kept and marked as deprecated to help migrating the current usage.
Does this PR introduce a breaking change?
Other information
This was briefly discussed with @alxhub on Slack