The node type (e.g., HTMLElement for DOM, string for SSR)
The error type (defaults to never for infallible elements)
Additional requirements/context type beyond RendererContext
// DOM element (using @effex/dom)
const myButton: Element<HTMLButtonElement> = button({ class: "primary" }, $.of("Click me"))
// Function that can fail
const UserProfile = () =>
Effect.gen(function* () {
const user = yield* fetchUser(userId)
return yield* div({}, $.of(user.name))
})
// Function with context requirements
const NavLink = () =>
Effect.gen(function* () {
const router = yield* RouterContext
return yield* button({ onClick: () => router.push("/") }, $.of("Home"))
})
A rendered element wrapped in an Effect with scope management. This is the generic version that works with any renderer.