Function inspectReactElement()
inspectReactElement(
element:ReactElementLike,options?:InspectionOptions):string
Source: inspect.ts
Returns a string representation of a React element.
Parameters
element
The React element to inspect.
options?
Optional inspection options.
Returns
string
The resulting string.
Example
Note: The following example omits the options parameter for simplicity. In reality, the return values will contain ANSI escape codes unless you explicitly set colors to false.
tsx
inspect(<h1>Example</h1>) === "<h1>Example</h1>"