React-native-windows: Support react-native-svg for RNW vNext

Created on 4 Oct 2019  路  7Comments  路  Source: microsoft/react-native-windows

https://github.com/react-native-community/react-native-svg

A lot of our app leverages stuff from react-native-svg and it's variety of views. For drawing gradients, vector graphics, on screen controls, and misc other things.

This has been a huge pain point for us trying to work around. As some of our buttons are deeply integrated with this, and we currently have no easy way of working around it.

Deliverable Extensions AppConsult Education ISV Facebook Stream Xbox enhancement must-have

All 7 comments

Our first priority is to fix #3573. which should unblock primary scenarios and lower the immediate priority for adding support to this community module.

There is still a pretty large use case that is not covered by #3573, which is trying to create animated components. There are quite a few libraries (e.g. react-native-circular-progress, react-native-progress) that require more than static svg support. Now some of this can be supported by the addition of lottie that I think is being tackled in another issue, but I would love to be able to use existing libraries dependent on either react-native-svg or @react-native-community/art

Our priority for animated vector graphics is to pursue lottie first via #3278. Both would be great, of course.

SVG is a huge module and also a lot of partners interested in it. It's unlikely they need _all_ of it, so for our ability to deliver value sooner let's figure out what the partners need first, because implementing the whole thing would take quite some time.

The interest from Messenger is to be able to render static svg icon assets (at any size). Also, this isn't a critical request from us. :)

@TheSavior - would it be possible to share a code snippet for rendering a static svg icon asset within the Messenger app? SVG is a big module that we're tackling incrementally and we want to ensure that the APIs that we're starting with are the ones that you'd use.

@appden can probably provide a snippet. However, I'm not convinced using svg is the right choice for our desktop app. All of our mobile apps use pngs and have tooling for that which we will probably pull over for desktop instead. The reason this came up initially was because the electron app was using svgs so that is what they are used to. I imagine this will be a sticking point for other electron developers considering React Native, although not a large priority for us.

Was this page helpful?
0 / 5 - 0 ratings