-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Description
This mixin appears in many components, checking if context.muiTheme
has changed.
First of all, I do not see why this component is necessary besides supporting dynamic theme. This can be done by creating a new theme context instance, React will then tell it has been changed.
Moreover, Its appearance may significantly affect the performance since it does checking in shouldComponentUpdate
every time react does reconciliation. Especially, this happens for every flat button and text field.
Last, but may not relate to this issue, context-pure mixin uses src/utils/shallow-equal.js
, the same function has been implemented as react addon react-addons-shallow-compare
. I think we should remove it from utils
.
Here is the sublime search result:
Edit by @newoga (replaced @yongxu sublime search results with checklist)
- flat-button-label.jsx ([Core] Remove context-pure mixin #3331)
- card-expandable.jsx ([Core] Remove context-pure mixin #3331)
- date-picker-dialog.jsx ([Core] Remove context-pure mixin #3331)
- flat-button.jsx ([Core] Remove context-pure mixin #3331)
- icon-button.jsx ([Core] Remove context-pure mixin #3331)
- SelectField.jsx ([Core] Remove context-pure mixin #3331)
- snackbar.jsx ([Core] Remove context-pure mixin #3331)
- TextField.jsx ([Core] Remove context-pure mixin #3331)