Skip to content

Commit d92affd

Browse files
authored
Update 03-lifecycle-hooks.md
1 parent 7be3afb commit d92affd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ While there's no "after update" hook, you can use `tick` to ensure that the UI i
6767

6868
```svelte
6969
<script>
70-
import { beforeUpdate, tick } from 'svelte';
70+
import { tick } from 'svelte';
7171
72-
beforeUpdate(async () => {
72+
$effect.pre(async () => {
7373
console.log('the component is about to update');
7474
await tick();
7575
console.log('the component just updated');

0 commit comments

Comments
 (0)