On version 0.2.0
When using conditional data, svgXmlData only updates on second render, example:
import SvgRenderer from 'react-native-svg-renderer';
const TestSvgRenderer = ({ condition = true }) => (
<View style={styles.container}>
<SvgRenderer
width="200"
height="200"
svgXmlData={condition ? 'svgTrue' : ' svgFalse'}
/>
</View>
);
If condition changes to false at the first time it will still render svgTrue
On version
0.2.0When using conditional data, svgXmlData only updates on second render, example:
If
conditionchanges tofalseat the first time it will still rendersvgTrue