Skip to content
Source
Sign inSign up
TanStack/redact

fix: retain queued child and store work through Suspense #133

Opentannerlinsleywants to merge 1 commit intomain fromtaren/queued-store-approvedopened

Showing 22 changed files with 10 additions and 15 deletions (loading 19).

x
0 of 22 viewed, 22 left
5 additions and 0 deletions.changeset/queued-descendant-updates.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/redact': patch
+---
+​
+Keep queued child state and context updates working when a parent reuses JSX, and retain pending work inside its Suspense boundary.
4 additions and 15 deletionspackages/redact/src/dom/features/context/full.tsModified
View file
@@ -59,21 +59,8 @@
return includeFallback && fiber.t === FiberTag.Suspense && !!fiber.b?.f && hasContextChanged(fiber.b.f);
-export function renderContextConsumers(fiber: Fiber): void {
- if (!changingProviders)
- return;
- let child = fiber.c;
- while (child) {
- // Pending parents must reconcile before context reaches their old children.
- if (child.g || (child.t === FiberTag.Suspense ? hasContextChanged(child) : ownContextChanged(child))) {
- renderNode(child);
- }
- else {
- renderContextConsumers(child);
- }
- child = child.s;