-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
30 lines (27 loc) · 791 Bytes
/
App.js
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
import React from "react"
import Navbar from "./Components/Navbar"
import Hero from "./Components/Hero"
import Card from "./Components/Card"
import data from "./data"
export default function App() {
// bu sekilde datayi direkt olarak aktarabiliriz
const cards = data.map(item => {
return(
<Card
key= {item.id} //map kullandigimiz her seferde key kullanmaliyiz
/* bu sekilde yazmak yerine spread syntax ile yazabilriz, butun itemleri kaldirmamiz gerekir
item={item} */
{...item}
/>
)
})
return (
<div>
<Navbar />
<Hero />
<section className="card-list">
{cards}
</section>
</div>
)
}