We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc2b1c8 + 5b2d19b commit ea3c8b1Copy full SHA for ea3c8b1
1 file changed
packages/labs/task/README.md
@@ -49,15 +49,15 @@ import {Task, TaskStatus} from '@lit-labs/task';
49
50
class MyElement extends LitElement {
51
@state()
52
- private _userId: number;
+ private _userId: number = -1;
53
54
private _apiTask = new Task(
55
this,
56
([userId]) =>
57
fetch(`//example.com/api/userInfo?${userId}`).then((response) =>
58
response.json()
59
),
60
- () => [this.userId]
+ () => [this._userId]
61
);
62
63
render() {
0 commit comments