Skip to content

Commit 2150ae8

Browse files
Update documentation/docs/06-runtime/03-lifecycle-hooks.md
Co-authored-by: Paolo Ricciuti <[email protected]>
1 parent d92affd commit 2150ae8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

documentation/docs/06-runtime/03-lifecycle-hooks.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ While there's no "after update" hook, you can use `tick` to ensure that the UI i
6969
<script>
7070
import { tick } from 'svelte';
7171
72-
$effect.pre(async () => {
72+
$effect.pre(() => {
7373
console.log('the component is about to update');
74-
await tick();
75-
console.log('the component just updated');
74+
tick().then(
75+
console.log('the component just updated');
76+
);
7677
});
7778
</script>
7879
```

0 commit comments

Comments
 (0)