Skip to content

Commit 70b442a

Browse files
zachasmeryanflorence
authored andcommitted
[added] React 0.12 compatibility
still have warnings, but we'll fix those soon
1 parent 37eebf5 commit 70b442a

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Diff for: modules/utils/ServerRendering.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var ReactDescriptor = require('react/lib/ReactDescriptor');
1+
var ReactElement = require('react/lib/ReactElement');
22
var ReactInstanceHandles = require('react/lib/ReactInstanceHandles');
33
var ReactMarkupChecksum = require('react/lib/ReactMarkupChecksum');
44
var ReactServerRenderingTransaction = require('react/lib/ReactServerRenderingTransaction');
@@ -39,7 +39,7 @@ function mergeStateIntoInitialProps(state, props) {
3939
*/
4040
function renderRoutesToString(routes, path, callback) {
4141
invariant(
42-
ReactDescriptor.isValidDescriptor(routes),
42+
ReactElement.isValidElement(routes),
4343
'You must pass a valid ReactComponent to renderRoutesToString'
4444
);
4545

@@ -74,7 +74,7 @@ function renderRoutesToString(routes, path, callback) {
7474
*/
7575
function renderRoutesToStaticMarkup(routes, path, callback) {
7676
invariant(
77-
ReactDescriptor.isValidDescriptor(routes),
77+
ReactElement.isValidElement(routes),
7878
'You must pass a valid ReactComponent to renderRoutesToStaticMarkup'
7979
);
8080

Diff for: modules/utils/Transition.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var mixInto = require('react/lib/mixInto');
21
var Promise = require('./Promise');
32
var Redirect = require('./Redirect');
43

@@ -15,7 +14,7 @@ function Transition(routesComponent, path) {
1514
this.isAborted = false;
1615
}
1716

18-
mixInto(Transition, {
17+
Transition.prototype = {
1918

2019
abort: function (reason) {
2120
this.abortReason = reason;
@@ -34,6 +33,6 @@ mixInto(Transition, {
3433
this.routesComponent.replaceWith(this.path);
3534
}
3635

37-
});
36+
};
3837

3938
module.exports = Transition;

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
"karma-firefox-launcher": "0.1.3",
3535
"karma-mocha": "0.1.3",
3636
"mocha": "1.20.1",
37-
"react": "0.11.x",
38-
"reactify": "^0.14.0",
37+
"react": "0.12.x",
38+
"reactify": "0.15.x",
3939
"rf-release": "0.3.2",
4040
"uglify-js": "2.4.15",
4141
"webpack": "1.4.5",
4242
"webpack-dev-server": "1.6.5"
4343
},
4444
"peerDependencies": {
45-
"react": "0.11.x"
45+
"react": "0.12.x"
4646
},
4747
"dependencies": {
4848
"events": "1.0.1",
@@ -64,4 +64,4 @@
6464
"browserify-shim": {
6565
"react": "global:React"
6666
}
67-
}
67+
}

0 commit comments

Comments
 (0)