Workaday Reading

Svelte’s lifecycle methods can be used anywhere

“I don’t think it’s widely known that you can call the Svelte lifecycle methods (onMount, onDestroy, beforeUpdate, afterUpdate) outside of a component. It is mentioned in the Svelte docs and tutorial, though it’s easy to gloss over.”

read »

Leave a Reply

Your email address will not be published. Required fields are marked *