Skip to content

Commit

Permalink
fix(content): fix svelte 5 on-mount (#206)
Browse files Browse the repository at this point in the history
`$effect` runs after the component gets mounted and rendered, but `pageTitle` isn't reactive. Thus, the page won't re-render with the new value.
For this logic, it's better to use `$effert.pre` - it runs before mounting and the first rendering. But as the example concerns the on-mount event, it's better to make `pageTitle` reactive.
  • Loading branch information
7nik authored Mar 3, 2024
1 parent 08c89c8 commit 89b0b18
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 89b0b18

Please sign in to comment.