Fix
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-07-28 04:32:08 +02:00
parent 55ca8a0dd4
commit ec8f9f2ddb
5 changed files with 16 additions and 12 deletions

View File

@@ -1,15 +1,16 @@
import { Container, Flex, Heading } from "@radix-ui/themes"
import { Chunk, Console, Effect } from "effect"
import { Component, Hook } from "effect-fc"
import { Component } from "effect-fc"
import { Hooks } from "effect-fc/hooks"
import { Todo } from "./Todo"
import { TodosState } from "./TodosState.service"
export class Todos extends Component.make(function* Todos() {
const state = yield* TodosState
const [todos] = yield* Hook.useSubscribeRefs(state.ref)
const [todos] = yield* Hooks.useSubscribeRefs(state.ref)
yield* Hook.useOnce(() => Effect.andThen(
yield* Hooks.useOnce(() => Effect.andThen(
Console.log("Todos mounted"),
Effect.addFinalizer(() => Console.log("Todos unmounted")),
))