Skip to content

Conversation

@cdn34dd
Copy link
Contributor

@cdn34dd cdn34dd commented Jan 5, 2026

What does this PR do?

This PR fixes a few issues related to 'Mandatory' props the plugin adds to react-native components. These 'Mandatory' props are props that can be omited on the user side, but will greatly improve the interaction tracking of the SDK, so the plugin adds them. With this PR we keep the same functionality, but fix some issues that could cause incorrect behaviors.

Motivation

Issue raised by user: @datadog/mobile-react-native-babel-plugin overwrites event handler props with noops

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@cdn34dd cdn34dd requested a review from a team as a code owner January 5, 2026 12:51
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-13371/fix-babel-incorrect-handler-override branch from c5e4928 to 8103c46 Compare January 5, 2026 12:53
- Prevent overriding handlers on custom components without proper
configuration
- Prevent overriding handlers when spread props are present
- Prevent adding 'Mandatory' handlers on custom components
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-13371/fix-babel-incorrect-handler-override branch from 8103c46 to f7dcf5c Compare January 8, 2026 15:47
@cdn34dd cdn34dd merged commit 5a910e3 into develop Jan 13, 2026
11 checks passed
@cdn34dd cdn34dd deleted the carlosnogueira/RUM-13371/fix-babel-incorrect-handler-override branch January 13, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants