0.1.0 #1

Merged
Thilawyn merged 81 commits from next into master 2025-07-17 21:17:57 +02:00
Showing only changes of commit 955bc5845c - Show all commits

View File

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