Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react): Make _mountSpan protected in the profiler for RN to access #3904

Merged
merged 2 commits into from
Aug 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/react/src/profiler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@ export type ProfilerProps = {
* spans based on component lifecycles.
*/
class Profiler extends React.Component<ProfilerProps> {
/**
* The span of the mount activity
* Made protected for the React Native SDK to access
*/
protected _mountSpan: Span | undefined = undefined;

// The activity representing how long it takes to mount a component.
private _mountActivity: number | null = null;
// The span of the mount activity
private _mountSpan: Span | undefined = undefined;

// eslint-disable-next-line @typescript-eslint/member-ordering
public static defaultProps: Partial<ProfilerProps> = {
Expand Down