Refactoring
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-07-28 04:02:55 +02:00
parent 09ed773b96
commit bada57a591
21 changed files with 8 additions and 3 deletions

View File

@@ -17,6 +17,10 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./hooks": {
"types": "./dist/types/hooks.d.ts",
"default": "./dist/types/hooks.js"
},
"./types": {
"types": "./dist/types/index.d.ts",
"default": "./dist/types/index.js"

View File

@@ -1,6 +1,6 @@
import { Context, Effect, Effectable, ExecutionStrategy, Function, Predicate, Runtime, Scope, String, Tracer, type Utils } from "effect"
import * as React from "react"
import * as Hook from "./Hook/index.js"
import { Hooks } from "./hooks/index.js"
import * as Memoized from "./Memoized.js"
@@ -40,7 +40,7 @@ const ComponentProto = Object.freeze({
runtimeRef.current = yield* Effect.runtime<Exclude<R, Scope.Scope>>()
return React.useCallback(function ScopeProvider(props: P) {
const scope = Runtime.runSync(runtimeRef.current)(Hook.useScope(
const scope = Runtime.runSync(runtimeRef.current)(Hooks.useScope(
Array.from(
Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values()
),

View File

@@ -0,0 +1,2 @@
export * from "./Hooks.js"
export * as Hooks from "./Hooks.js"

View File

@@ -1,5 +1,4 @@
export * as Component from "./Component.js"
export * as Hook from "./Hook/index.js"
export * as Memoized from "./Memoized.js"
export * as ReactManagedRuntime from "./ReactManagedRuntime.js"
export * as Suspense from "./Suspense.js"