feat(react): remount islands on hot module replacement

Disposes and re-creates island roots after a source change. Island state
resets by design; Fast Refresh needs a Babel/SWC transform plus a
runtime and is out of scope for v1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-18 15:34:36 +05:30
co-authored by Claude Opus 5
parent 5f66c8129c
commit 02fdfa3aee
3 changed files with 81 additions and 0 deletions
+1
View File
@@ -6,3 +6,4 @@ export { IslandErrorBoundary } from "./error-boundary.tsx";
export type { IslandErrorBoundaryProps } from "./error-boundary.tsx";
export { islandRootCount, mountIslands, unmountIslands } from "./island-runtime.ts";
export type { MountOptions } from "./island-runtime.ts";
export { remountIslands } from "./island-runtime.ts";