Function beforeUpdate

  • Schedules a callback to run immediately before the component is updated after any state change.

    The first time the callback runs will be before the initial onMount

    https://svelte.dev/docs/svelte#beforeupdate

    Parameters

    • fn: (() => any)
        • (): any
        • Returns any

    Returns void