Skip to content

Commit

Permalink
add missing comma in custom-directives.md (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
38elements authored Jul 18, 2023
1 parent 9ef7136 commit c1dee95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export const resolvePromise = directive(ResolvePromise);

Here, the rendered template shows "Waiting for promise to resolve", followed by the resolved value of the promise, whenever it resolves.

Async directives often need to subscribe to external resources. To prevent memory leaks async directives should unsubscribe or dispose of resources when the directive instance is no longer in use. For this purpose, `AsyncDirective` provides the following extra lifecycle callbacks and API:
Async directives often need to subscribe to external resources. To prevent memory leaks, async directives should unsubscribe or dispose of resources when the directive instance is no longer in use. For this purpose, `AsyncDirective` provides the following extra lifecycle callbacks and API:

* `disconnected()`: Called when a directive is no longer in use. Directive instances are disconnected in three cases:
- When the DOM tree the directive is contained in is removed from the DOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export const resolvePromise = directive(ResolvePromise);

Here, the rendered template shows "Waiting for promise to resolve", followed by the resolved value of the promise, whenever it resolves.

Async directives often need to subscribe to external resources. To prevent memory leaks async directives should unsubscribe or dispose of resources when the directive instance is no longer in use. For this purpose, `AsyncDirective` provides the following extra lifecycle callbacks and API:
Async directives often need to subscribe to external resources. To prevent memory leaks, async directives should unsubscribe or dispose of resources when the directive instance is no longer in use. For this purpose, `AsyncDirective` provides the following extra lifecycle callbacks and API:

* `disconnected()`: Called when a directive is no longer in use. Directive instances are disconnected in three cases:
- When the DOM tree the directive is contained in is removed from the DOM
Expand Down

0 comments on commit c1dee95

Please sign in to comment.