Skip to content

Commit

Permalink
Update 03-lifecycle-hooks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eltigerchino authored Oct 26, 2024
1 parent 7be3afb commit d92affd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/06-runtime/03-lifecycle-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ 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(async () => {
console.log('the component is about to update');
await tick();
console.log('the component just updated');
Expand Down

0 comments on commit d92affd

Please sign in to comment.