fix(sync): preserve loader through Strict Mode probe

This commit is contained in:
Bohdan Triapitsyn
2026-07-30 17:43:39 +03:00
parent 7a16290ff3
commit ededdc14f9
4 changed files with 52 additions and 3 deletions
@@ -161,6 +161,18 @@ export class SessionMessageLoader {
}
}
/**
* Re-enable a loader which was disposed by a transient React effect cleanup.
*
* React Strict Mode runs effect setup, cleanup, then setup again in
* development. The provider owns one ref-stable loader across that sequence,
* so the second setup must be able to accept new work after the first cleanup
* invalidated its in-flight requests.
*/
activate(): void {
this.disposed = false
}
ensure(
target: SessionMessageTarget,
options?: { force?: boolean; reason?: "navigation" | "reactive" | "prefetch" },