UNPKG

1.69 kBJavaScriptView Raw
1'use strict';
2
3var _reactTransformHmr2 = require('react-transform-hmr');
4
5var _reactTransformHmr3 = _interopRequireDefault(_reactTransformHmr2);
6
7var _react = require('react');
8
9var _reactTransformCatchErrors2 = require('react-transform-catch-errors');
10
11var _reactTransformCatchErrors3 = _interopRequireDefault(_reactTransformCatchErrors2);
12
13var _redboxReact = require('redbox-react');
14
15var _components = {
16 _$Unknown: {}
17};
18
19var _reactComponentWrapper = (0, _reactTransformHmr3['default'])({
20 filename: 'src/Panel.jsx',
21 components: _components,
22 locals: [module],
23 imports: [_react]
24});
25
26var _reactComponentWrapper2 = (0, _reactTransformCatchErrors3['default'])({
27 filename: 'src/Panel.jsx',
28 components: _components,
29 locals: [],
30 imports: [_react, _redboxReact]
31});
32
33function _wrapComponent(uniqueId) {
34 return function (ReactClass) {
35 return _reactComponentWrapper2(_reactComponentWrapper(ReactClass, uniqueId), uniqueId);
36 };
37}
38
39function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
40
41var React = require('react');
42
43var Panel = _wrapComponent('_$Unknown')(React.createClass({
44
45 shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
46 // not render if the status didnt change or the children is the same
47 // if (nextProps.update) {
48 // return true;
49 // } else if (nextProps.status === this.props.status) {
50 // return false;
51 // } else {
52 // return true;
53 // }
54 return true;
55 },
56
57 render: function render() {
58 var tmpl;
59 return React.createElement(
60 'div',
61 { className: this.props.className },
62 this.props.children
63 );
64 }
65}));
66
67module.exports = Panel;
\No newline at end of file