@@ -101,7 +101,7 @@ export const useSuspenseFC: {
|
||||
const FC = React.useMemo(() => {
|
||||
const inner = (props: { readonly promise: Promise<React.ReactNode> }) => React.use(props.promise)
|
||||
|
||||
const f = React.memo((props: P) => {
|
||||
const f = (props: P) => {
|
||||
const promise = Runtime.runPromise(runtimeRef.current)(
|
||||
Effect.provideService(self(props), Scope.Scope, scope)
|
||||
)
|
||||
@@ -110,7 +110,7 @@ export const useSuspenseFC: {
|
||||
{ fallback: "Loading..." },
|
||||
React.createElement(inner, { promise }),
|
||||
)
|
||||
})
|
||||
}
|
||||
f.displayName = self.displayName ?? "Anonymous"
|
||||
return f
|
||||
}, [scope])
|
||||
|
||||
Reference in New Issue
Block a user