Skip to content

Commit

Permalink
Merge pull request #155 from benjamine/master
Browse files Browse the repository at this point in the history
fixes #115 skip updates using PureComponent
  • Loading branch information
securingsincity authored Nov 1, 2016
2 parents c1fcd53 + d44ec15 commit 6572186
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ace.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ace from 'brace';
import React, { Component, PropTypes } from 'react';
import React, { PureComponent, PropTypes } from 'react';
import isEqual from 'lodash.isequal';

const { Range } = ace.acequire('ace/range');
Expand All @@ -15,7 +15,7 @@ const editorOptions = [
'enableSnippets',
];

export default class ReactAce extends Component {
export default class ReactAce extends PureComponent {
constructor(props) {
super(props);
[
Expand Down Expand Up @@ -185,7 +185,6 @@ export default class ReactAce extends Component {
}
}


componentWillUnmount() {
this.editor.destroy();
this.editor = null;
Expand Down

0 comments on commit 6572186

Please sign in to comment.