This repository was archived by the owner on Jun 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { Component } from 'react'
22import ListContacts from './ListContacts'
33
4- const contacts = [
5- {
6- id : 'tyler' ,
7- name : 'Tyler McGinnis' ,
8- handle : '@tylermcginnis' ,
9- avatarURL : 'http://localhost:5001/tyler.jpg'
10- } ,
11- {
12- id : 'karen' ,
13- name : 'Karen Isgrigg' ,
14- handle : '@karen_isgrigg' ,
15- avatarURL : 'http://localhost:5001/karen.jpg'
16- } ,
17- {
18- id : 'richard' ,
19- name : 'Richard Kalehoff' ,
20- handle : '@richardkalehoff' ,
21- avatarURL : 'http://localhost:5001/richard.jpg'
22- } ,
23- ]
24-
254class App extends Component {
5+ state = {
6+ contacts : [
7+ {
8+ id : 'tyler' ,
9+ name : 'Tyler McGinnis' ,
10+ handle : '@tylermcginnis' ,
11+ avatarURL : 'http://localhost:5001/tyler.jpg'
12+ } ,
13+ {
14+ id : 'karen' ,
15+ name : 'Karen Isgrigg' ,
16+ handle : '@karen_isgrigg' ,
17+ avatarURL : 'http://localhost:5001/karen.jpg'
18+ } ,
19+ {
20+ id : 'richard' ,
21+ name : 'Richard Kalehoff' ,
22+ handle : '@richardkalehoff' ,
23+ avatarURL : 'http://localhost:5001/richard.jpg'
24+ } ,
25+ ]
26+ }
2627 render ( ) {
2728 return (
2829 < div >
29- < ListContacts contacts = { contacts } />
30+ < ListContacts contacts = { this . state . contacts } />
3031 </ div >
3132 )
3233 }
You can’t perform that action at this time.
0 commit comments