Replace react-addons-pure-render-mixin by React.PureComponent (#1902)
react-addons-pure-render-mixin is deprecated so use React.PureComponent instead * https://www.npmjs.com/package/react-addons-pure-render-mixin * https://facebook.github.io/react/docs/react-api.html#react.purecomponent
This commit is contained in:
parent
c626f0414f
commit
b609366d76
3 changed files with 80 additions and 82 deletions
|
|
@ -1,16 +1,12 @@
|
|||
import React from 'react';
|
||||
import {StyleSheet, css} from 'aphrodite-simple';
|
||||
import {shouldComponentUpdate} from 'react-addons-pure-render-mixin';
|
||||
|
||||
export default class Component extends React.Component {
|
||||
export default class Component extends React.PureComponent {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.styles_ = this.createStyleSheet();
|
||||
this.cssHelper = this.cssHelper.bind(this);
|
||||
if (!this.shouldComponentUpdate) {
|
||||
this.shouldComponentUpdate = shouldComponentUpdate.bind(this);
|
||||
}
|
||||
}
|
||||
|
||||
createStyleSheet() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue