Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Undeadlol1 committed Nov 28, 2016
1 parent b8dfcfc commit 28b82f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/components/elements/Icon.jsx
Original file line number Diff line number Diff line change
@@ -44,6 +44,12 @@ export default class Icon extends React.Component {
className: React.PropTypes.string
};

/* sometimes when you use same Icon in different components (or pages?),
and it's get unmounted, Icon gets unmounted everywhere */
shouldComponentUpdate(nextProps) {
return this.props.name == nextProps.name
}

render() {
const {name, size, className} = this.props;
let classes = 'Icon ' + name;

0 comments on commit 28b82f9

Please sign in to comment.