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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs_app/content/guide/observable.md
Expand Up @@ -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()`.


For instance, this is how we clear an interval execution set with `setInterval`:

Expand Down