Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor: drop publish, publishReplay, and ConnectableObservable #1638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
Loading
from

Conversation

edbzn
Copy link
Member

@edbzn edbzn commented Nov 6, 2023

publish, publishReplay, and ConnectableObservable are deprecated in RxJS v7 and removed in upcoming v8.

@github-actions github-actions bot added the { } State @rx-angular/state related label Nov 6, 2023
@@ -74,7 +74,7 @@ export class RxEffects implements OnDestroy, OnDestroy$ {
private static nextId = 0;
readonly _hooks$ = new Subject<DestroyProp>();
private readonly observables$ = new Subject<Observable<unknown>>();
// we have to use publish here to make it hot (composition happens without subscriber)
// we have to use share here to make it hot (composition happens without subscriber)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this comment even true?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably it is meant in a different way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is not true? share will multicast the stream (hot), so the computation is only made once even if there are multiple subscribers. Here is an example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

composition happens without subscriber is not true for share, only for connectable after calling the connect method :)

@edbzn
Copy link
Member Author

edbzn commented Nov 16, 2023

TODO: check RxJS version compatibility

@hoebbelsB
Copy link
Member

@edbzn this def. changes our minimum rxjs requirement. connectable is not present in 6.5.3

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
{ } State @rx-angular/state related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.