Skip to content

Commit fb937bb

Browse files
kadoshmsMor Kadosh
andauthored
[example/until] replace call to jsonplaceholder with a static text (#1337)
Co-authored-by: Mor Kadosh <[email protected]>
1 parent 18419ed commit fb937bb

File tree

1 file changed

+2
-5
lines changed
  • packages/lit-dev-content/samples/examples/directive-until

1 file changed

+2
-5
lines changed

packages/lit-dev-content/samples/examples/directive-until/my-element.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ import {customElement, state} from 'lit/decorators.js';
33
import {until} from 'lit/directives/until.js';
44

55
const fetchData = async () => {
6-
const response = await fetch('https://jsonplaceholder.typicode.com/todos/2');
7-
const json = await response.json();
8-
// Add some delay for demo purposes
9-
await new Promise<void>((r) => setTimeout(() => r(), 1000));
10-
return json.title;
6+
await new Promise<void>((r) => setTimeout(() => r(), 2000));
7+
return 'Lorem Ipsum';
118
}
129

1310
@customElement('my-element')

0 commit comments

Comments
 (0)