Skip to content

Conditional svgXmlData doesn't work properly #20

Description

@danibonilha

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions