+628
-3732
lines changedFilter options
+628
-3732
lines changed Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@
13
13
14
14
var React = require('React');
15
15
16
-
var Child = React.createClass({
17
-
render: function() {
16
+
class Child extends React.Component {
17
+
render() {
18
18
return React.createElement('div');
19
-
},
20
-
});
19
+
}
20
+
}
21
21
22
22
module.exports = Child;
Original file line number Diff line number Diff line change
@@ -13,23 +13,18 @@
13
13
14
14
var React = require('React');
15
15
16
-
var ReactMockedComponentTestComponent = React.createClass({
17
-
getDefaultProps: function() {
18
-
return {bar: 'baz'};
19
-
},
16
+
class ReactMockedComponentTestComponent extends React.Component {
17
+
state = {foo: 'bar'};
20
18
21
-
getInitialState: function() {
22
-
return {foo: 'bar'};
23
-
},
24
-
25
-
hasCustomMethod: function() {
19
+
hasCustomMethod() {
26
20
return true;
27
-
},
21
+
}
28
22
29
-
render: function() {
23
+
render() {
30
24
return <span />;
31
-
},
25
+
}
32
26
33
-
});
27
+
}
28
+
ReactMockedComponentTestComponent.defaultProps = {bar: 'baz'};
34
29
35
30
module.exports = ReactMockedComponentTestComponent;
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@
69
69
"merge-stream": "^1.0.0",
70
70
"object-assign": "^4.1.1",
71
71
"platform": "^1.1.0",
72
+
"react-create-class": "15.5.0-alpha.2",
72
73
"run-sequence": "^1.1.4",
73
74
"through2": "^2.0.0",
74
75
"tmp": "~0.0.28",
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4