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

This commit is contained in:
Julien Valverdé
2025-08-19 02:19:01 +02:00
parent e665a9d691
commit 4a6ae5dfd8
3 changed files with 15 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ import { Container, TextField } from "@radix-ui/themes"
import { createFileRoute } from "@tanstack/react-router"
import { Schema, SubscriptionRef } from "effect"
import { Component, Memo } from "effect-fc"
import { useInput, useOnce } from "effect-fc/hooks"
import { useInput, useOnce, useRefState } from "effect-fc/hooks"
const IntFromString = Schema.NumberFromString.pipe(Schema.int())
@@ -23,11 +23,13 @@ const Input = Component.makeUntraced(function* Input() {
const input2 = yield* useInput({ schema: IntFromString, ref: intRef2 })
const [str, setStr] = yield* useRefState(stringRef)
return (
<Container>
<IntTextFieldInputFC ref={intRef1} />
<TextField.Root value={input2.value} onChange={input2.onChange} />
<StringTextFieldInputFC ref={stringRef} />
<TextField.Root value={str} onChange={e => setStr(e.target.value)} />
</Container>
)
}).pipe(