Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
JSX.DebugSourceA function to inspect a JSX.element.
This function allows you to convert a JSX.element to its debuggable representation, which can be helpful for inspecting and debugging the structure of the element.
let debug: JSX.Debug.element =
JSX.Debug.view(
<div>
<h1> {JSX.string("Hello, World!")} </h1>
</div>
);
match debug with
| JSX.Debug.Node {tag; attributes; children} -> Printf.printf("Node: %s", tag)
| _ -> ()