sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

[SR] Recursive unmasking

Open kahest opened this issue 8 months ago • 3 comments

Problem Statement

Currently, unmasking a component affects only the component directly wrapped with <Sentry.Unmask>. For some use cases where the actual text components are two or more levels down in a nested component tree, this can become cumbersome and may also require unwanted updates to component code (e.g. <Text> several levels into a Button component - user wants to unmask the button label).

Solution Brainstorm

Provide an API to mark a component for unmasking recursively.

Note: There was a conscious decision not do to this initially, because it makes it easy to unmask more than intended. If this is implemented, it should be very clear to the user what happens, and very hard/impossible to do it unintentionally.

E.g. something like <Sentry.Unmask recursively="true"> (default: false)


There is currently no priority for this item. If you are interested in this, please upvote the issue 👍

kahest avatar Apr 03 '25 21:04 kahest

Note: this could also unlock https://github.com/getsentry/sentry-react-native/issues/4628

kahest avatar Apr 03 '25 21:04 kahest