Hacker News new | past | comments | ask | show | jobs | submit login

You can use `untrack` [1] when you don't want to react to some state inside an effect.

You can still use `onMount`. It's not deprecated [2], although `$effect` could be used similarly going forward.

[1] https://svelte-5-preview.vercel.app/docs/functions#untrack

[2] https://svelte-5-preview.vercel.app/docs/runes#$effect-what-...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: