Overview
React Grab exports several utility functions for advanced use cases. These functions provide low-level access to React Grab’s internals.Functions
getStack()
Element
required
The DOM element to get stack information for
StackFrame[] | null
Array of stack frames containing component information, or null if instrumentation is not active
formatElementInfo()
Element
required
The DOM element to format information for
string
Formatted string containing element context (tag name, component name, file path, line number)
isInstrumentationActive()
true if React Grab can access React’s internal fiber tree for debugging.
boolean
Whether React instrumentation is active
getGlobalApi()
window.__REACT_GRAB__ or the internal global reference.
ReactGrabAPI | null
The global API instance, or null if React Grab has not been initialized
setGlobalApi()
window.__REACT_GRAB__ and the internal global reference.
ReactGrabAPI | null
required
The API instance to set globally, or null to clear
generateSnippet()
Element
required
The DOM element to generate a snippet for
string
HTML string representation of the element
Constants
DEFAULT_THEME
See Also
- init() - Initialize React Grab
- ReactGrabAPI - Main API interface
- Theme - Theme configuration
