Skip to content

Commit

Permalink
fix useRxSetPromise not mounting
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed May 20, 2024
1 parent ec60fc9 commit dad697a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strange-apricots-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-rx/rx-react": patch
---

fix useRxSetPromise not mounting
2 changes: 1 addition & 1 deletion packages/rx-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const useRxSetPromise = <E, A, W>(
resolves.clear()
fns.forEach((resolve) => resolve(Result.toExit(result) as any))
}
}), [registry, rx, resolves])
}, { immediate: true }), [registry, rx, resolves])
return React.useCallback((value) =>
new Promise((resolve) => {
resolves.add(resolve)
Expand Down

0 comments on commit dad697a

Please sign in to comment.