Controlled Svelte 5.23.2 Diagnostic Compares Async and Sync CleanupControlled Svelte 5.23.2 Diagnostic Compares Async and Sync Cleanup
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Controlled Svelte cleanup diagnostic
Hx Works ran a self-initiated lifecycle check with Svelte 5.23.2: two self-written components, real mount/unmount, and a ControlledEventSource mock.
Both cases waited for the same Promise step and the setup-ready signal before unmount. In two recorded browser runs: • Async onMount callback: returned-cleanup invocations 0; close() calls 0. • Synchronous-return control: returned-cleanup invocations 1; close() calls 1. • Both: mounted DOM removed; onDestroy hook called once.
Observed event order: setup ready → unmount requested → onDestroy. Only the synchronous-return control then invoked cleanup and close().
Unclosed counts refer only to mock objects. The ControlledEventSource mock opened no network connection. Real HTTP/SSE, retained-memory measurement, unmount during pending setup, and cross-browser behavior were not tested. The synchronous control is not a complete production patch.
Self-initiated research demonstration.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started