Module: core/debug
This module provides helper functions for debugging AI.JSX applications.
Functions
DebugTree
▸ DebugTree(props
, «destructured»
): AsyncGenerator
<string
, Node
[], unknown
>
Render a tree of JSX elements as a string, yielding each step of the rendering process.
Most devs will not need to use this directly, and should use showInspector instead.
Example
<DebugTree>
<MyComponent />
</DebugTree>
==>
Frame 0: <DebugTree><MyComponent /></DebugTree>
Frame 1: <DebugTree>the text my component resolved to</DebugTree>
Parameters
Name | Type |
---|---|
props | Object |
props.children | Node |
«destructured» | RenderContext |
Returns
AsyncGenerator
<string
, Node
[], unknown
>