main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
830 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | var tslib_1 = require("tslib");
|
---|
4 | var React = tslib_1.__importStar(require("react"));
|
---|
5 | var wrapInStatefulComponent = function (Comp) {
|
---|
6 | var Decorated = (function (_super) {
|
---|
7 | tslib_1.__extends(class_1, _super);
|
---|
8 | function class_1() {
|
---|
9 | return _super !== null && _super.apply(this, arguments) || this;
|
---|
10 | }
|
---|
11 | class_1.prototype.render = function () {
|
---|
12 | return Comp(this.props, this.context);
|
---|
13 | };
|
---|
14 | return class_1;
|
---|
15 | }(React.Component));
|
---|
16 | if (process.env.NODE_ENV !== 'production') {
|
---|
17 | Decorated.displayName = "Decorated(" + (Comp.displayName || Comp.name) + ")";
|
---|
18 | }
|
---|
19 | return Decorated;
|
---|
20 | };
|
---|
21 | exports.default = wrapInStatefulComponent;
|
---|
22 | //# sourceMappingURL=wrapInStatefulComponent.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.