Skip to content

Commit 7c23411

Browse files
fix(react): stop retrying rejected lazy loads (#753)
1 parent 097f76e commit 7c23411

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.changeset/calm-otters-wait.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@stackflow/react": patch
3+
---
4+
5+
Fix SSR rendering that does not finish after a structured activity content
6+
loader rejects.

integrations/react/src/utils/PreloadableLazyComponent.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ export function preloadableLazyComponent<P extends {}>(
1414
default: ComponentType<P>;
1515
}> | null = null;
1616
const cachedLoad = () => {
17-
if (
18-
!cachedLoadingPromise ||
19-
inspect(cachedLoadingPromise).status === PromiseStatus.REJECTED
20-
) {
17+
if (!cachedLoadingPromise) {
2118
cachedLoadingPromise = load();
2219
}
2320

0 commit comments

Comments
 (0)