Skip to content

Commit 1a91402

Browse files
cubadomingojustin808
authored andcommitted
Update BaseComponent.jsx (shakacode#351)
Change in the BaseComponent as it seems to be using the `PureRenderMixin` mixin. The react docs states that we should consider using React.PureComponent instead, which essentially does the same shallow compare. * Update BaseComponent.jsx * removes pure-render-mixin from dependencies
1 parent d616d24 commit 1a91402

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
import React from 'react';
2-
import PureRenderMixin from 'react-addons-pure-render-mixin';
32

4-
export default class BaseComponent extends React.Component {
5-
shouldComponentUpdate(theArgs) {
6-
return PureRenderMixin.shouldComponentUpdate.apply(this, ...theArgs);
7-
}
8-
}
3+
export default class BaseComponent extends React.PureComponent {
4+
};

client/npm-shrinkwrap.json

-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"postcss-loader": "^1.1.1",
7272
"react": "^15.4.1",
7373
"react-addons-css-transition-group": "^15.4.1",
74-
"react-addons-pure-render-mixin": "^15.4.1",
7574
"react-bootstrap": "^0.30.7",
7675
"react-dom": "^15.4.1",
7776
"react-on-rails": "^6.2.1",

client/webpack.client.base.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = {
3131
'immutable',
3232
'lodash',
3333
'marked',
34-
'react-addons-pure-render-mixin',
3534
'react-bootstrap',
3635
'react-dom',
3736
'react-redux',

0 commit comments

Comments
 (0)