-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFirst.tsx
50 lines (45 loc) · 2.11 KB
/
First.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from "react";
import Second from "./Second";
interface IState {
key1: string;
key2: number;
key3: boolean;
key4: any[];
}
interface IProps{}
class First extends React.Component<IProps,IState> {
constructor(props: IProps) {
super(props);
this.state = {
key1: "Hello",
key2: 200,
key3: false,
key4: [{"Name": "Alfreds Futterkiste", "City": "Berlin", "Country": "Germany"},
{"Name": "Ana Trujillo Emparedados y helados", "City": "México D.F.", "Country": "Mexico"},
{"Name": "Antonio Moreno Taquería", "City": "México D.F.", "Country": "Mexico"},
{"Name": "Around the Horn", "City": "London", "Country": "UK"},
{"Name": "B's Beverages", "City": "London", "Country": "UK"},
{"Name": "Berglunds snabbköp", "City": "Luleå", "Country": "Sweden"},
{"Name": "Blauer See Delikatessen", "City": "Mannheim", "Country": "Germany"},
{"Name": "Blondel père et fils", "City": "Strasbourg", "Country": "France"},
{"Name": "Bólido Comidas preparadas", "City": "Madrid", "Country": "Spain"},
{"Name": "Bon app'", "City": "Marseille", "Country": "France"},
{"Name": "Bottom-Dollar Marketse", "City": "Tsawassen", "Country": "Canada"},
{"Name": "Cactus Comidas para llevar", "City": "Buenos Aires", "Country": "Argentina"},
{"Name": "Centro comercial Moctezuma", "City": "México D.F.", "Country": "Mexico"},
{"Name": "Chop-suey Chinese", "City": "Bern", "Country": "Switzerland"},
{"Name": "Comércio Mineiro", "City": "São Paulo", "Country": "Brazil"}]
}
}
render() {
return (
<React.Fragment>
<Second key1={this.state.key1}
key2={this.state.key2}
key3={this.state.key3}
key4={this.state.key4}></Second>
</React.Fragment>
)
}
}
export default First;