Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions documentation/docs/06-runtime/03-lifecycle-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ While there's no "after update" hook, you can use `tick` to ensure that the UI i

```svelte
<script>
import { beforeUpdate, tick } from 'svelte';
import { tick } from 'svelte';

beforeUpdate(async () => {
$effect.pre(() => {
console.log('the component is about to update');
await tick();
console.log('the component just updated');
tick().then(
console.log('the component just updated');
);
});
</script>
```
Expand Down