Skip to content

Commit 19319f1

Browse files
authored
Merge pull request Flipboard#159 from pinqy520/master
Upgrade to react v15+
2 parents 71d2f43 + 822f766 commit 19319f1

File tree

20 files changed

+66
-41
lines changed

20 files changed

+66
-41
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["react"]
3+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
build
22
node_modules
3+
yarn.lock
4+
npm-debug.log

examples/css-layout/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
var React = require('react');
42
var ReactDOM = require('react-dom');
53
var ReactCanvas = require('react-canvas');

examples/gradient/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
'use strict';
42

53
var React = require('react');

examples/listview/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
'use strict';
42

53
var React = require('react');

examples/listview/components/Item.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
'use strict';
42

53
var React = require('react');

examples/timeline/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
'use strict';
42

53
var React = require('react');

examples/timeline/components/Page.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @jsx React.DOM */
2-
31
'use strict';
42

53
var React = require('react');

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var gulp = require('gulp');
22
var del = require('del');
33
var connect = require('gulp-connect');
4-
var webpack = require('gulp-webpack');
4+
var webpack = require('webpack-stream');
55
var webpackConfig = require('./webpack.config.js');
66

77
var port = process.env.PORT || 8080;

lib/ContainerMixin.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// https://github.com/reactjs/react-art
55

66
var React = require('react');
7-
var ReactMultiChild = require('react/lib/ReactMultiChild');
7+
var ReactMultiChild = require('react-dom/lib/ReactMultiChild');
88
var emptyObject = require('fbjs/lib/emptyObject');
99

1010
var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
@@ -16,7 +16,7 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
1616
* @param {number} toIndex Destination index of the element.
1717
* @protected
1818
*/
19-
moveChild: function(child, toIndex) {
19+
moveChild: function(child, afterNode, toIndex, lastIndex) {
2020
var childNode = child._mountImage;
2121
var mostRecentlyPlacedChild = this._mostRecentlyPlacedChild;
2222
if (mostRecentlyPlacedChild == null) {
@@ -48,7 +48,7 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
4848
* @param {object} childNode ART node to insert.
4949
* @protected
5050
*/
51-
createChild: function(child, childNode) {
51+
createChild: function(child, afterNode, childNode) {
5252
child._mountImage = childNode;
5353
var mostRecentlyPlacedChild = this._mostRecentlyPlacedChild;
5454
if (mostRecentlyPlacedChild == null) {
@@ -121,7 +121,9 @@ var ContainerMixin = Object.assign({}, ReactMultiChild.Mixin, {
121121
i++;
122122
}
123123
}
124-
}
124+
},
125+
getHostNode: function () { return this.node },
126+
getNativeNode: function () { return this.node },
125127

126128
});
127129

0 commit comments

Comments
 (0)