File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
- var merge = require ( 'react/lib/merge ' ) ;
1
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
2
2
var Route = require ( './Route' ) ;
3
3
4
4
/**
@@ -9,7 +9,7 @@ var Route = require('./Route');
9
9
*/
10
10
function DefaultRoute ( props ) {
11
11
return Route (
12
- merge ( props , {
12
+ objectAssign ( { } , props , {
13
13
path : null ,
14
14
isDefault : true
15
15
} )
Original file line number Diff line number Diff line change 1
1
var React = require ( 'react' ) ;
2
2
var classSet = require ( 'react/lib/cx' ) ;
3
- var merge = require ( 'react/lib/merge ' ) ;
3
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
4
4
var ActiveState = require ( '../mixins/ActiveState' ) ;
5
5
var Navigation = require ( '../mixins/Navigation' ) ;
6
6
@@ -93,7 +93,7 @@ var Link = React.createClass({
93
93
} ,
94
94
95
95
render : function ( ) {
96
- var props = merge ( this . props , {
96
+ var props = objectAssign ( { } , this . props , {
97
97
href : this . getHref ( ) ,
98
98
className : this . getClassName ( ) ,
99
99
onClick : this . handleClick
Original file line number Diff line number Diff line change 1
- var merge = require ( 'react/lib/merge ' ) ;
1
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
2
2
var Route = require ( './Route' ) ;
3
3
4
4
/**
@@ -10,7 +10,7 @@ var Route = require('./Route');
10
10
*/
11
11
function NotFoundRoute ( props ) {
12
12
return Route (
13
- merge ( props , {
13
+ objectAssign ( { } , props , {
14
14
path : null ,
15
15
catchAll : true
16
16
} )
Original file line number Diff line number Diff line change 1
1
var React = require ( 'react' ) ;
2
2
var warning = require ( 'react/lib/warning' ) ;
3
3
var invariant = require ( 'react/lib/invariant' ) ;
4
- var copyProperties = require ( 'react/lib/copyProperties ' ) ;
4
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
5
5
var HashLocation = require ( '../locations/HashLocation' ) ;
6
6
var ActiveContext = require ( '../mixins/ActiveContext' ) ;
7
7
var LocationContext = require ( '../mixins/LocationContext' ) ;
@@ -416,7 +416,7 @@ var Routes = React.createClass({
416
416
throw new Error ( 'Passing children to a route handler is not supported' ) ;
417
417
418
418
return route . props . handler (
419
- copyProperties ( props , addedProps )
419
+ objectAssign ( props , addedProps )
420
420
) ;
421
421
} . bind ( this , props ) ;
422
422
} ) ;
Original file line number Diff line number Diff line change 1
1
var React = require ( 'react' ) ;
2
- var copyProperties = require ( 'react/lib/copyProperties ' ) ;
2
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
3
3
4
4
/**
5
5
* A mixin for components that store the active state of routes,
@@ -40,14 +40,14 @@ var ActiveContext = {
40
40
* Returns a read-only object of the currently active URL parameters.
41
41
*/
42
42
getActiveParams : function ( ) {
43
- return copyProperties ( { } , this . state . activeParams ) ;
43
+ return objectAssign ( { } , this . state . activeParams ) ;
44
44
} ,
45
45
46
46
/**
47
47
* Returns a read-only object of the currently active query parameters.
48
48
*/
49
49
getActiveQuery : function ( ) {
50
- return copyProperties ( { } , this . state . activeQuery ) ;
50
+ return objectAssign ( { } , this . state . activeQuery ) ;
51
51
} ,
52
52
53
53
childContextTypes : {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ var ReactMarkupChecksum = require('react/lib/ReactMarkupChecksum');
4
4
var ReactServerRenderingTransaction = require ( 'react/lib/ReactServerRenderingTransaction' ) ;
5
5
6
6
var cloneWithProps = require ( 'react/lib/cloneWithProps' ) ;
7
- var copyProperties = require ( 'react/lib/copyProperties ' ) ;
7
+ var objectAssign = require ( 'react/lib/Object.assign ' ) ;
8
8
var instantiateReactComponent = require ( 'react/lib/instantiateReactComponent' ) ;
9
9
var invariant = require ( 'react/lib/invariant' ) ;
10
10
@@ -16,7 +16,7 @@ function cloneRoutesForServerRendering(routes) {
16
16
}
17
17
18
18
function mergeStateIntoInitialProps ( state , props ) {
19
- copyProperties ( props , {
19
+ objectAssign ( props , {
20
20
initialPath : state . path ,
21
21
initialMatches : state . matches ,
22
22
initialActiveRoutes : state . activeRoutes ,
You can’t perform that action at this time.
0 commit comments