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

Allow implementing custom text parents as extensions of RCTText

Open DrRefactor opened this issue 7 months ago • 4 comments

Summary:

There's no way to implement:

  1. Custom text parent. Both Fabric and old renderers explicitely disallow this.
  2. Extension of RCTText, e.g. as an Android native module.

My use case: I needed to slightly override native behavior of ReactTextView, but conditions in React Native renderers make it impossible without monkey patching React Native.

Changelog:

[INTERNAL] [ADDED] - Option to extend native RCTText

Test Plan:

Create native module extending ReactTextViewManager with NAME starting with RCTTextExtension-.

DrRefactor avatar Jul 10 '24 07:07 DrRefactor