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

    Returns void