Docs
Lint / lint (push) Successful in 17s

This commit is contained in:
Julien Valverdé
2026-06-09 10:54:00 +02:00
parent 88b3a1c98a
commit 0a59fdf2b4
+4 -4
View File
@@ -214,20 +214,20 @@ import { Component } from "effect-fc"
const UserPanelView = Component.make("UserPanel")(
function* (props: { readonly userId: string }) {
const user = yield* Component.useOnChange(
const label = yield* Component.useOnChange(
() =>
Effect.gen(function* () {
yield* Console.log(`Loading ${props.userId}`)
yield* Console.log(`Preparing view for ${props.userId}`)
yield* Effect.addFinalizer(() =>
Console.log(`Cleaning up ${props.userId}`),
)
return yield* fetchUser(props.userId)
return `Viewing user ${props.userId}`
}),
[props.userId],
)
return <p>{user.name}</p>
return <p>{label}</p>
},
)
```