react-mui-base

1.2.3 • Public • Published

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

Package Sidebar

Install

npm i react-mui-base

Weekly Downloads

1

Version

1.2.3

License

MIT

Last publish

Collaborators

  • hemanth