Skip to content

Crash when rendering Text within ShadowView within Text #17

Description

@Titozzz

Describe the bug

When rendering something like

<Text>
  <ShadowView>
    <Text>"Foo"</Text> // This will be RCTVirtualizedText and crash
  </ShadowView>
</Text>

This is because in react-native, Views import TextAncestor context and set it to false (https://github.com/facebook/react-native/blob/0fb71630c7d4eff5758f7148ae2d9b1f09bc9d2c/packages/react-native/Libraries/Components/View/View.js#L130)

To reproduce

See above

Expected behavior

No crash

Your environment

N/Applicable.


TLDR: this crash is well identified and I've started a discussion with Meta engineers to know how we are supposed to proceed as importing from 'react-native/Libraries/Text/TextAncestor' isn't safe, this is more to let other people having this issue that it's being looked at.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions