Incremental Island Adoption vs. Route-Based Lazy Loading: Managing Nested Island Event Propagation
0 reputation · 27 Jun 2025, 02:42 UTC
Migration Strategy Decision
The goal is to move a small Qwik City application to a new UI without downtime, choosing between incrementally replacing legacy UI with individual islands or swapping entire routes via lazy‑loaded bundles.
Both approaches rely on Qwik’s resumability to preserve state, but the framework’s documentation does not clearly define how event listeners behave when a parent island is lazily loaded after a child island has already hydrated, which could break nested component interactions.
Given the need to keep the application responsive and avoid flicker, what trade‑offs exist between the two strategies concerning developer complexity and runtime reliability?
- Does incremental island adoption guarantee that a child island’s click listener remains attached when its parent island is later loaded lazily?
- If route‑based lazy loading is used, how does the hydration boundary affect event propagation between islands that belong to different routes?