Skip to content

Commit

Permalink
fix suspenseRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Smart committed Sep 21, 2023
1 parent 5fc245a commit 7af6cd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/late-islands-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-rx/rx-react": patch
---

fix suspenseRegistry
2 changes: 1 addition & 1 deletion packages/rx-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const useRxSuspense = <E, A>(
if (!suspenseCache.has(resultRx)) {
const unmount = registry.mount(resultRx)
suspenseCache.set(resultRx, unmount)
suspenseRegistry.register(resultRx, unmount, resultRx)
suspenseRegistry.register(result.promise, unmount, resultRx)
}
throw result.promise
} else if (suspenseCache.has(resultRx)) {
Expand Down

0 comments on commit 7af6cd8

Please sign in to comment.