Skip to content

New arch doesn't render React Native components inside SVG #2519

@pnthach95

Description

@pnthach95

Description

I'm sorry if it is a duplicate, first time use new arch because of RN 0.76

<PillInforBox>
  <View style={styles.sectionContainer}>
    <Text style={styles.sectionTitle}>top text</Text>
    <Text style={styles.sectionTitle}>BOTTOM TEXT</Text>
  </View>
</PillInforBox>
const PillInforBox = ({children}) => {
  return (
    <Svg>
      ...
      {children}
    </Svg>
  )
}

I code like this and it works in old arch until now (RN 0.76). I tested with

RN 0.75 RN 0.76
Old arch OK OK
New arch Fail Fail

New arch
Screenshot 2024-10-29 at 1 58 40 PM

Old arch
Screenshot 2024-10-29 at 2 10 11 PM

Steps to reproduce

  1. Clone and build reproduction in new arch
  2. Disable new arch and rebuild
  3. There is rn75 branch if you want to test

Snack or a link to a repository

https://github.com/pnthach95/rn76

SVG version

15.8.0

React Native version

0.76.0

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions