Skip to content

React: Don't set react.componentStack context #20094

Description

@timfish

In captureReactException we set a react context with the raw error.stack:

returnwithScope(scope=>{
scope.setContext('react',{ componentStack });
returncaptureException(error,hint);
});

This context will never have sourcemaps applied so it will be mostly useless to users. For React >= v17 the stack also gets included in the error and will have sourcemaps applied.

A user has asked why this context is set and I can't see a valid reason for it.

It might offer some context for React < v17 but it seems unlikely without sourcemaps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions