Skip to content

Commit

Permalink
Revert "Experiment one: Try making makeTemplateComponent return PureC…
Browse files Browse the repository at this point in the history
…omponent, does not seem to speed up"

This reverts commit 3335224.
  • Loading branch information
Matthew Reishus authored and Matthew Reishus committed Jan 22, 2018
1 parent 3335224 commit dc5b374
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/external/react-table-modified/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,11 @@ function makeTemplateComponent(compClass, displayName) {
if (!displayName) {
throw new Error("No displayName found for template component:", compClass);
}

let cmp = class extends React.PureComponent {
render() {
const { children, className, ...rest } = this.props;
return (
<div className={classnames(compClass, className)} {...rest}>
{children}
</div>
);
}
};

const cmp = ({ children, className, ...rest }) => (
<div className={classnames(compClass, className)} {...rest}>
{children}
</div>
);
cmp.displayName = displayName;
return cmp;
}
Expand Down

0 comments on commit dc5b374

Please sign in to comment.