Tests
All checks were successful
Lint / lint (push) Successful in 14s

This commit is contained in:
Julien Valverdé
2025-06-30 22:07:38 +02:00
parent 2a37f843ca
commit 4913f5cc35

View File

@@ -5,11 +5,19 @@ import { ReactComponent, ReactHook, ReactManagedRuntime } from "effect-component
import * as React from "react" import * as React from "react"
const LogLive = Layer.scopedDiscard(Effect.acquireRelease(
Console.log("Runtime built."),
() => Console.log("Runtime destroyed."),
))
class TestService extends Effect.Service<TestService>()("TestService", { class TestService extends Effect.Service<TestService>()("TestService", {
effect: Effect.bind(Effect.Do, "ref", () => SubscriptionRef.make("value")), effect: Effect.bind(Effect.Do, "ref", () => SubscriptionRef.make("value")),
}) {} }) {}
const runtime = ReactManagedRuntime.make(Layer.empty) const runtime = ReactManagedRuntime.make(Layer.empty.pipe(
Layer.provideMerge(LogLive),
Layer.provideMerge(TestService.Default),
))
export const Route = createFileRoute("/effect-component-tests")({ export const Route = createFileRoute("/effect-component-tests")({