TSXLight / docsProject documentation

Reference

TSX Rendering Pipeline

Look up syntax, contracts, layouts, algorithms, and exact behavior.

The renderer walks components and JSX elements recursively, turning the tree into an HTML string. Primitive children become text, component children render through their own rendered children, and JSX elements become DOM strings with serialized props.

H=render⁡(T,K)H = \operatorname{render}(T, K)
Render function. The renderer transforms a component tree T and callback registry K into an HTML shell.

Callback props receive special handling. When a prop starts with an event-style name, the renderer registers the function with the CallbackManager, emits a stable callback ID into the markup, and generates client-side code that calls back over the socket when the user triggers the event.

k=(userId,pageId,elementId,eventName)k = (userId, pageId, elementId, eventName)
Callback identity. A callback is addressed by user, page, generated element identity, and event name.
  • JSDOM provides the server-side DOM environment.
  • Template files provide the initial web or Electron shell.
  • Style props are converted from TSX-style objects into CSS text.
  • Callback IDs are regenerated during render and stored server-side.