Skip to content

@zeus-js/zeus

Unified entry point for the Zeus framework.

Public APIs

The main entry exports stable, user-facing APIs:

ExportDescription
createSignalCreate a shallow getter/setter pair
createMemoCreate a cached derived getter
createEffectCreate an owned reactive effect
createRootCreate an explicit reactive owner
batchBatch reactive updates
onCleanupRegister effect or owner cleanup
renderMount a component tree to DOM
ShowConditional rendering
ForList rendering
HostWeb Component host boundary
SlotWeb Component slot projection
defineElementDefine a custom element

Internal APIs

Runtime helpers are not exported from the main entry.

@zeus-js/runtime-dom, @zeus-js/runtime-ssr, and @zeus-js/signal/internal are compiler/framework implementation surfaces and are not covered by application stability guarantees.

Server Entry

Server rendering is exposed from a dedicated entry that does not load the DOM runtime:

ts
import { For, Show, createSignal, renderToString } from '@zeus-js/zeus/server'

renderToString accepts a synchronous render factory. See Server Rendering for usage and current limitations.

JSX Runtime

ts
import { Fragment, jsx, jsxs, jsxDEV } from '@zeus-js/zeus'

render

ts
function render(
  code: JSXValue | (() => JSXValue),
  element: Element | DocumentFragment,
): () => void

Renders a component tree into a DOM element.

tsx
import { render } from '@zeus-js/zeus'

const dispose = render(() => <App />, document.getElementById('root')!)

dispose()

Show

See Control Flow guide.

For

See Control Flow guide.

defineElement

See Web Components guide.

Host

See Web Components guide.

Slot

See Web Components guide.