Skip to content

Svg does not render in fabric react-native-macos 0.81 #2869

Description

@Roshan-24

Description

SVG does not load in react-native-macos 0.81 with the new arch enabled

Old arch:
Image

New arch (same code):
Image

Code (App.tsx):

import { Text, View } from "react-native";
import SvgExample from "./SvgExample";

export default function () {
  return (
    <View>
      <Text>Hello</Text>
      <View style={{backgroundColor: 'red', width: 500, height: 500}} />
      <SvgExample />
    </View>
  )
}

Steps to reproduce

  1. Create a fresh react native project
  2. Add macOS support (https://microsoft.github.io/react-native-macos/docs/getting-started)
  3. Install react-native-svg
  4. Try to render any SVG
  5. Build and run the app with new arch enabled

Snack or a link to a repository

https://github.com/Roshan-24/rnm-81-svg-repro

SVG version

15.15.2

React Native version

0.81.5

Platforms

macOS

JavaScript runtime

None

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions