Bug 1287613 - New console frontend: use shouldComponentUpdate and add perf test. r=bgrins
This commit is contained in:
@@ -33,6 +33,10 @@ const MessageContainer = createClass({
|
||||
message: PropTypes.object.isRequired
|
||||
},
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
return this.props.message.repeat !== nextProps.message.repeat;
|
||||
},
|
||||
|
||||
render() {
|
||||
const { message } = this.props;
|
||||
let MessageComponent = createFactory(getMessageComponent(message));
|
||||
|
||||
Reference in New Issue
Block a user