@@ -4,15 +4,16 @@ var React = require("react");
4
4
var Fragment = React . Fragment || "div" ;
5
5
6
6
exports . component_ = function ( spec ) {
7
- function Component ( props ) {
7
+ var Component = function constructor ( props ) {
8
8
this . state = spec . initialState ;
9
9
return this ;
10
- }
10
+ } ;
11
+
11
12
Component . prototype = Object . create ( React . Component . prototype ) ;
12
13
13
- Component . prototype . displayName = spec . displayName ;
14
+ Component . displayName = spec . displayName ;
14
15
15
- Component . prototype . componentDidMount = function ( ) {
16
+ Component . prototype . componentDidMount = function componentDidMount ( ) {
16
17
var this_ = this ;
17
18
spec . receiveProps ( this . props , this . state , function ( newState ) {
18
19
return function ( ) {
@@ -21,7 +22,9 @@ exports.component_ = function(spec) {
21
22
} ) ;
22
23
} ;
23
24
24
- Component . prototype . componentWillReceiveProps = function ( newProps ) {
25
+ Component . prototype . componentWillReceiveProps = function componentWillReceiveProps (
26
+ newProps
27
+ ) {
25
28
var this_ = this ;
26
29
spec . receiveProps ( newProps , this . state , function ( newState ) {
27
30
return function ( ) {
@@ -30,7 +33,7 @@ exports.component_ = function(spec) {
30
33
} ) ;
31
34
} ;
32
35
33
- Component . prototype . render = function ( ) {
36
+ Component . prototype . render = function render ( ) {
34
37
var this_ = this ;
35
38
return spec . render ( this . props , this . state , function ( newState ) {
36
39
return function ( ) {
0 commit comments