Persists the state immediatelly.

  • Parameters

    • func: (() => void)
        • (): void
        • Returns void

    Returns void