react-native-svg: Intermittent failure to render on iOS 11
I’m still investigating this and will add more here as I discover it, but I’m seeing that several (but not all) SVGs in my app intermittently (but not always) fail to render. Is anyone else seeing this?
According to the inspector, the element is there and has its proper dimensions as normal, but at least one element is completely invisible.
In my case, the elements in question are all Circles or Rects with gradient fills that are overlayed by something else. In one case, I have several shapes within one <Svg> component, and only one of those shapes ( a Circle) is intermittent, the rest work (inlcuding another Circle) never fail.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 16
This doesn’t seem to happen for me anymore. But much in my setup has changed.
• iOS 12.1 • react-native: 0.55.4 • react-navigation: 2.2.5 • react-native-svg: 6.2.1
I found a workaround, my app reliably didn’t render any SVGs after pushing a screen anymore, which made it unusable.
I‘m now simply triggering a rerender of the SVG path, after it loaded by setting a new color value in a 0 timeout in componentDidMount.