Skip to content
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

Update observable.md - remove create() - deprecated #7313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j8ahmed
Copy link

@j8ahmed j8ahmed commented Aug 2, 2023

Remove the reference to the old create method on the Observable. with the standard new Observable() which is used everywhere else.

Remove the reference to the old `create` method on the Observable. with the standard `new Observable()` which is used everywhere else.
Copy link
Member

@jakovljevic-mladen jakovljevic-mladen left a comment

Choose a reason for hiding this comment

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

LGTM, but with one suggestion.

@@ -408,7 +408,7 @@ subscription.unsubscribe();

<span class="informal">When you subscribe, you get back a Subscription, which represents the ongoing execution. Just call `unsubscribe()` to cancel the execution.</span>

Each Observable must define how to dispose resources of that execution when we create the Observable using `create()`. You can do that by returning a custom `unsubscribe` function from within `function subscribe()`.
Each Observable must define how to dispose resources of that execution when we create the Observable using `new Observable(function subscribe() {...})`. You can do that by returning a custom `unsubscribe` function from within `function subscribe()`.
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, but I would rather just remove explanation how to create Observable since it was explained before. Like this:

Suggested change
Each Observable must define how to dispose resources of that execution when we create the Observable using `new Observable(function subscribe() {...})`. You can do that by returning a custom `unsubscribe` function from within `function subscribe()`.
Each Observable must define how to dispose resources of that execution when we create the Observable. You can do that by returning a custom `unsubscribe` function from within `function subscribe()`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants