Skip to content

Commit

Permalink
Fix a few mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfagnani committed Oct 1, 2024
1 parent 053ff6e commit 07319b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/lit-dev-content/site/docs/v3/data/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ all update when the value changes.

```ts
import {LitElement, html} from 'lit';
import {customElement, property} from 'lit';
import {customElement} from 'lit/decorators.js';
import {SignalWatcher, signal} from '@lit-labs/signals';

const count = signal(0);
Expand All @@ -174,7 +174,7 @@ export class SharedCounterComponent extends SignalWatcher(LitElement) {
render() {
return html`
<p>The count is ${count.get()}</p>
<button @click=${this.#onClick}>Increment<button></button></button>
<button @click=${this.#onClick}>Increment</button>
`;
}

Expand Down Expand Up @@ -206,7 +206,7 @@ This examples is the same as the previous, but only the DOM controlled by the

```ts
import {LitElement, html} from 'lit';
import {customElement, property} from 'lit';
import {customElement} from 'lit/decorators.js';
import {SignalWatcher, watch, signal} from '@lit-labs/signals';

const count = signal(0);
Expand All @@ -222,7 +222,7 @@ export class SharedCounterComponent extends SignalWatcher(LitElement) {
render() {
return html`
<p>The count is ${watch(count)}</p>
<button @click=${this.#onClick}>Increment<button></button></button>
<button @click=${this.#onClick}>Increment</button>
`;
}

Expand Down Expand Up @@ -269,8 +269,8 @@ import {SignalWatcher, html, signal} from '@lit-labs/signals';
// SharedCounterComponent ...
render() {
return html`
<p>The count is ${watch(count)}</p>
<button @click=${this.#onClick}>Increment<button></button></button>
<p>The count is ${count}</p>
<button @click=${this.#onClick}>Increment</button>
`;
}
```
Expand Down

0 comments on commit 07319b4

Please sign in to comment.