MCPcopy Create free account
hub / github.com/coderarmy-notes/mern-stack-course / Body

Function Body

04React/Day10/src/components/Body.jsx:5–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import Product from "./Product"
4
5function Body(){
6
7 const [items, setItems] = useState([
8 {id:1,name:"Milk", price:100},
9 {id:2,name:"Protein", price:10000},
10 {id:3,name:"Almond", price:200},
11 {id:4,name:"Coconut", price:10},
12 {id:5,name:"Amul ghee", price:200}
13 ])
14
15
16 return(
17 <>
18 <h1>I am the Blinkit Body</h1>
19 {/* <Counter/> */}
20 <div style={{display: "flex", gap:"50px"}}>
21 {
22 items.map((item)=> <Product key={item.id} item={item}></Product>)
23 }
24 </div>
25 </>
26 )
27}
28
29export default Body;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected