Work
Some checks failed
Lint / lint (push) Failing after 28s

This commit is contained in:
Julien Valverdé
2025-06-27 05:43:58 +02:00
parent 9ba36ebc04
commit faf1d4963c
2 changed files with 19 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
import { Box, Text, TextField } from "@radix-ui/themes"
import { createFileRoute } from "@tanstack/react-router"
import { Console, Effect, Layer, ManagedRuntime } from "effect"
import { Console, Effect, Layer, ManagedRuntime, SubscriptionRef } from "effect"
import { ReactComponent, ReactHook } from "effect-components"
import * as React from "react"
@@ -22,6 +22,10 @@ function RouteComponent() {
}
class TestService extends Effect.Service<TestService>()("TestService", {
effect: Effect.bind(Effect.Do, "ref", () => SubscriptionRef.make("value")),
}) {}
const MyTestComponent = Effect.fn(function* MyTestComponent(props?: { readonly value?: string }) {
const [state, setState] = React.useState("value")
const effectValue = yield* Effect.succeed(`state: ${ state }`)