0.1.3 #4
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
),
|
||||
|
||||
2
packages/effect-fc/src/hooks/index.ts
Normal file
2
packages/effect-fc/src/hooks/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./Hooks.js"
|
||||
export * as Hooks from "./Hooks.js"
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user