Skip to content

Komsan74/react-bootstrap-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

table-with-react-bootstrap

บทฝึกหัดนี้เป็นการสร้างตารางข้อมูล โดยใช้ react-bootstrap เฟรมเวิร์ค

กำหนดแม่แบบตาราง โดยศึกษารูปแบบจาก react-bootstrap แล้วให้รีเทิร์นค่าออกมาตาม props ที่เรากำหนด

  • header = อาร์เรย์ชื่อส่วนหัวตาราง (column header)
  • data = อาร์เรย์ข้อมูลที่นำมาแสดงในตาราง
    <Tables data={data} header={["column1", "column2", "...columN"]} />
  • กำหนด {data} ด้วยการดึงข้อมูลจำลองมาจาก https://fakestoreapi.com

Get all products

    fetch('https://fakestoreapi.com/products')
                .then(res=>res.json())
                .then(json=>console.log(json))

อ้างอิง

About

Created with CodeSandbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published