Awesome
react-mui-base
BaseComponent for react-material-ui
Install
$ npm install --save react-mui-base
Usage
Instead of :
'use strict';
import {Component} from 'react';
import {Styles} from 'material-ui';
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
let ThemeManager = new Styles.ThemeManager();
class MyComponent extends Component {
constructor() {
super();
}
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
}
render() {
}
}
MyComponent.childContextTypes = {
muiTheme: React.PropTypes.object
};
MyComponent.contextTypes = {};
We could do:
import BaseComponent from 'react-mui-base'
class MyComponent extends BaseComponent {
constructor() {
super();
}
render() {
}
}
License
MIT © Hemanth.HM