software-mansion / software-mansion/react-native-svg
Svg does not render in fabric react-native-macos 0.81
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8k
- Forks
- 1.2k
- Avg merge
- 10d 9h
- Merged PRs (30d)
- 2
Description
Description
SVG does not load in react-native-macos 0.81 with the new arch enabled
Old arch:
New arch (same code):
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
- Create a fresh react native project
- Add macOS support (https://microsoft.github.io/react-native-macos/docs/getting-started)
- Install react-native-svg
- Try to render any SVG
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Roshan-24/rnm-81-svg-repro repository and its App.tsx example, then run it on macOS with React Native 0.81.5, Fabric, and react-native-svg 15.15.2. Compare the old-architecture and new-architecture runs; done means an SVG renders correctly in the new-architecture macOS build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- desktop-dev, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100