SubRef tests
All checks were successful
Lint / lint (push) Successful in 16s

This commit is contained in:
Julien Valverdé
2025-06-17 20:34:23 +02:00
parent e8a267f4cb
commit 37ffc161d3

View File

@@ -6,6 +6,13 @@ import { Console, Effect, Option } from "effect"
import { useEffect, useState } from "react"
interface Node {
readonly value: string
readonly left?: Node
readonly right?: Node
}
const makeUuid = Effect.provide(makeUuid4, GetRandomValues.CryptoRandom)
@@ -32,6 +39,11 @@ function RouteComponent() {
runSync,
), [scopeLayer, runSync])
const nodeRef = R.useRef(() => Effect.succeed<Node>({ value: "prout" }))
const nodeValueRef = R.useSubRefFromPath(nodeRef, ["value"])
return (
<Flex direction="column" justify="center" align="center" gap="2">
<Text>{uuid}</Text>