3

我想在 React-Native 中渲染网络图像我以前使用过 ttf 方法,效果很好,但这种方法仅用于静态图像我想用轻量级方法渲染 svg 图像,我知道一些库可用但它们在android上非常慢所以我想避免这些有什么方法可以在android上顺利渲染svg图像?

没有完美回答。

从 'reacr-native-svg-uri' 导入 Svg

我目前正在使用的这个库。

我不想使用这个库,因为这会导致 android 出现性能问题。

4

1 回答 1

0

同意。SVG 图像有一个很大的性能问题。如果可能,请尝试使用 RN 图像标签。否则,请尝试以下解决方案:

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

https://medium.com/@wcandillon/5-things-to-know-about-images-react-native-69be41d2a9ee

https://www.npmjs.com/package/react-native-fast-image

于 2020-05-12T17:49:52.310 回答