diff --git a/packages/effect-fc/src/Component.ts b/packages/effect-fc/src/Component.ts index f1b14e9..21a160b 100644 --- a/packages/effect-fc/src/Component.ts +++ b/packages/effect-fc/src/Component.ts @@ -11,7 +11,7 @@ export type ComponentTypeId = typeof ComponentTypeId * Represents an Effect-based React Component that integrates the Effect system with React. */ export interface Component
-extends ComponentPrototype
, ComponentOptions {
+extends ComponentPrototype
-extends Pipeable.Pipeable {
- readonly [ComponentTypeId]: ComponentTypeId
+export interface ComponentImpl
+extends Component , ComponentImplPrototype ): void
- transformFunctionComponent(f: React.FC ): React.FC
+ asFunctionComponent(runtimeRef: React.Ref (
- this: Component ,
+ this: ComponentImpl ,
runtimeRef: React.RefObject (
- this: Component ,
+ this: ComponentImpl ,
f: React.FC ,
) {
f.displayName = this.displayName ?? "Anonymous"
@@ -82,7 +77,7 @@ export const ComponentPrototype: ComponentPrototype (
- self: Component
+ self: ComponentImpl
) {
// biome-ignore lint/style/noNonNullAssertion: React ref initialization
const runtimeRef = React.useRef
+extends Pipeable.Pipeable {
+ readonly [ComponentTypeId]: ComponentTypeId
+ readonly use: Effect.Effect