Skip to content

Commit 53bc0fb

Browse files
committed
Revert "Revert "[removed] "static" <Route> props""
This reverts commit 0cd20cf.
1 parent b7cceba commit 53bc0fb

File tree

3 files changed

+2
-36
lines changed

3 files changed

+2
-36
lines changed

modules/components/Route.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
var React = require('react');
2-
var withoutProperties = require('../utils/withoutProperties');
3-
4-
/**
5-
* A map of <Route> component props that are reserved for use by the
6-
* router and/or React. All other props are considered "static" and
7-
* are passed through to the route handler.
8-
*/
9-
var RESERVED_PROPS = {
10-
handler: true,
11-
path: true,
12-
defaultRoute: true,
13-
notFoundRoute: true,
14-
paramNames: true,
15-
children: true // ReactChildren
16-
};
172

183
/**
194
* <Route> components specify components that are rendered to the page when the
@@ -64,16 +49,9 @@ var Route = React.createClass({
6449

6550
displayName: 'Route',
6651

67-
statics: {
68-
69-
getUnreservedProps: function (props) {
70-
return withoutProperties(props, RESERVED_PROPS);
71-
}
72-
73-
},
74-
7552
propTypes: {
7653
handler: React.PropTypes.any.isRequired,
54+
getAsyncProps: React.PropTypes.func,
7755
path: React.PropTypes.string,
7856
name: React.PropTypes.string
7957
},

modules/components/Routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ var Routes = React.createClass({
387387
reversedArray(matches).forEach(function (match) {
388388
var route = match.route;
389389

390-
props = Route.getUnreservedProps(route.props);
390+
props = {};
391391

392392
props.ref = '__activeRoute__';
393393
props.params = match.params;

modules/utils/withoutProperties.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)