File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ var App = React.createClass({
62
62
} ,
63
63
64
64
renderContacts ( ) {
65
- return this . props . data . contacts . map ( ( contact ) => {
65
+ return this . props . data . contacts . map ( ( contact , i ) => {
66
66
return (
67
- < li >
67
+ < li key = { i } >
68
68
< Link to = "contact" params = { contact } > { contact . first } { contact . last } </ Link >
69
69
</ li >
70
70
) ;
Original file line number Diff line number Diff line change @@ -32,8 +32,12 @@ var App = React.createClass({
32
32
} ,
33
33
34
34
render : function ( ) {
35
- var links = this . state . tacos . map ( function ( taco ) {
36
- return < li > < Link to = "taco" params = { taco } > { taco . name } </ Link > </ li > ;
35
+ var links = this . state . tacos . map ( function ( taco , i ) {
36
+ return (
37
+ < li key = { i } >
38
+ < Link to = "taco" params = { taco } > { taco . name } </ Link >
39
+ </ li >
40
+ ) ;
37
41
} ) ;
38
42
return (
39
43
< div className = "App" >
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ var AsyncElement = {
20
20
} ,
21
21
22
22
render : function ( ) {
23
- var component = this . constructor . loadedComponent ;
24
- if ( component ) {
23
+ var Component = this . constructor . loadedComponent ;
24
+ if ( Component ) {
25
25
// can't find RouteHandler in the loaded component, so we just grab
26
26
// it here first.
27
27
this . props . activeRoute = < RouteHandler /> ;
28
- return component ( this . props ) ;
28
+ return < Component { ... this . props } /> ;
29
29
}
30
30
return this . preRender ( ) ;
31
31
}
You can’t perform that action at this time.
0 commit comments