Skip to content

Commit

Permalink
[added] React 0.12 compatibility
Browse files Browse the repository at this point in the history
still have warnings, but we'll fix those soon
  • Loading branch information
zachasme authored and ryanflorence committed Oct 30, 2014
1 parent 37eebf5 commit 70b442a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions modules/utils/ServerRendering.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var ReactDescriptor = require('react/lib/ReactDescriptor');
var ReactElement = require('react/lib/ReactElement');
var ReactInstanceHandles = require('react/lib/ReactInstanceHandles');
var ReactMarkupChecksum = require('react/lib/ReactMarkupChecksum');
var ReactServerRenderingTransaction = require('react/lib/ReactServerRenderingTransaction');
Expand Down Expand Up @@ -39,7 +39,7 @@ function mergeStateIntoInitialProps(state, props) {
*/
function renderRoutesToString(routes, path, callback) {
invariant(
ReactDescriptor.isValidDescriptor(routes),
ReactElement.isValidElement(routes),
'You must pass a valid ReactComponent to renderRoutesToString'
);

Expand Down Expand Up @@ -74,7 +74,7 @@ function renderRoutesToString(routes, path, callback) {
*/
function renderRoutesToStaticMarkup(routes, path, callback) {
invariant(
ReactDescriptor.isValidDescriptor(routes),
ReactElement.isValidElement(routes),
'You must pass a valid ReactComponent to renderRoutesToStaticMarkup'
);

Expand Down
5 changes: 2 additions & 3 deletions modules/utils/Transition.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var mixInto = require('react/lib/mixInto');
var Promise = require('./Promise');
var Redirect = require('./Redirect');

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

mixInto(Transition, {
Transition.prototype = {

abort: function (reason) {
this.abortReason = reason;
Expand All @@ -34,6 +33,6 @@ mixInto(Transition, {
this.routesComponent.replaceWith(this.path);
}

});
};

module.exports = Transition;
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"karma-firefox-launcher": "0.1.3",
"karma-mocha": "0.1.3",
"mocha": "1.20.1",
"react": "0.11.x",
"reactify": "^0.14.0",
"react": "0.12.x",
"reactify": "0.15.x",
"rf-release": "0.3.2",
"uglify-js": "2.4.15",
"webpack": "1.4.5",
"webpack-dev-server": "1.6.5"
},
"peerDependencies": {
"react": "0.11.x"
"react": "0.12.x"
},
"dependencies": {
"events": "1.0.1",
Expand All @@ -64,4 +64,4 @@
"browserify-shim": {
"react": "global:React"
}
}
}

0 comments on commit 70b442a

Please sign in to comment.