Function: useComponentRenderTracing

@ottrelite/core.useComponentRenderTracing

useComponentRenderTracing(eventName, additionalEventArgs?, api?): Object

Hook to trace component render performance. Registers immediate events if using the 'dev' API; for 'otel' API, records spans starting & ending at component actual render after shadow tree commit, the JS rendering logic duration is recorded as attribute jsLogicDuration. This is because of React's concurrent rendering model, see the README for more information on that.

Parameters

NameTypeDefault valueDescription
eventNamestringundefinedThe name of the event to trace.
additionalEventArgs?Record<string, string>undefinedAdditional arguments to include in the trace. In case of both APIs, they will be set at event start.
apiTracingAPI'dev'The API to use for tracing (default is 'dev').

Returns

Object

An object containing the markJSRenderEnd function.

NameType
markJSRenderEnd() => void
Need to boost your app's performance?
We help React Native teams enhance speed, responsiveness, and efficiency.