diff --git a/lib/create-icon-set.js b/lib/create-icon-set.js index dcf7f5330..e42eaf69d 100644 --- a/lib/create-icon-set.js +++ b/lib/create-icon-set.js @@ -277,7 +277,18 @@ function createIconSet(glyphMap : Object, fontFamily : string, fontFile : string componentWillReceiveProps: function(nextProps) { var keys = Object.keys(IconToolbarAndroid.propTypes); if(!isEqual(pick(nextProps, keys), pick(this.props, keys))) { - this.updateIconSources(nextProps); + var stateToEvict = []; + if (!nextProps.navIconName) { + stateToEvict.push('navIcon'); + } + if (!nextProps.iconName) { + stateToEvict.push('icon'); + } + if (this.state && stateToEvict.length) { + this.replaceState(omit(this.state, stateToEvict), () => this.updateIconSources(nextProps)); + } else { + this.updateIconSources(nextProps); + } } },