diff --git a/packages/example/src/routes/effect-component-tests.tsx b/packages/example/src/routes/effect-component-tests.tsx
index c564f03..7cfb033 100644
--- a/packages/example/src/routes/effect-component-tests.tsx
+++ b/packages/example/src/routes/effect-component-tests.tsx
@@ -1,6 +1,6 @@
import { Box, Text, TextField } from "@radix-ui/themes"
import { createFileRoute } from "@tanstack/react-router"
-import { Console, Effect, Runtime } from "effect"
+import { Console, Effect, Layer, ManagedRuntime, Runtime } from "effect"
import * as React from "react"
@@ -9,15 +9,31 @@ export const Route = createFileRoute("/effect-component-tests")({
})
function RouteComponent() {
- return Effect.runSync(MyTestComponent)
+ const runtime = React.useMemo(() => ManagedRuntime.make(Layer.empty), [])
+
+ return runtime.runSync(Effect.gen(function* RouteComponent() {
+ const MyTest = yield* useFunctionComponent(MyTestComponent)
+
+ return <>
+
(
+ self: (props: P) => Effect.Effect