Skip to content
Snippets Groups Projects
Commit 38917a7f authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #395 from paulkaplan/hotfix/audio-library-rerender

Use PureComponent and remove incorrect shouldComponentUpdate call
parents dc74beca a7535ed6
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ const React = require('react');
const Box = require('../box/box.jsx');
const styles = require('./library-item.css');
class LibraryItem extends React.Component {
class LibraryItem extends React.PureComponent {
constructor (props) {
super(props);
bindAll(this, [
......@@ -14,9 +14,6 @@ class LibraryItem extends React.Component {
'handleMouseLeave'
]);
}
shouldComponentUpdate (nextProps) {
return this.props.iconURL !== nextProps.iconURL;
}
handleClick (e) {
this.props.onSelect(this.props.id);
e.preventDefault();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment