Skip to content

Commit

Permalink
Re-fetch data if source.uri change
Browse files Browse the repository at this point in the history
  • Loading branch information
matc4 committed Dec 8, 2016
1 parent 2fbda05 commit d25385a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ class SvgUri extends Component{
}
}

componentWillReceiveProps(nextProps) {
if (this.props.source && this.props.source.uri && nextProps.source.uri != this.props.source.uri)
this.fecthSVGData(nextProps.source.uri);
}


async fecthSVGData(uri){
try {
Expand Down

0 comments on commit d25385a

Please sign in to comment.