Skip to content
Snippets Groups Projects
Commit 9baa204c authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Use PureComponent and remove incorrect shouldComponentUpdate call

parent f78ed66b
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