React Covid19 complete project part 6 Build your own hook Write custom hooks. How to use Chart.js

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2024
  • Using React hooks this project fetches data from a REST API and shows the number of people infected, recovered and dead due to the Corona (Covid-19) virus.
    In this video, we use the custom hook that we made in our previous video (please see the videos in this list or the links below in the description section). In our previous video (part 5), we show how to write your own custom hooks. We showed how to build your own hook that could be used in the code anywhere in your app to make drop down boxes for you.
    You write the custom hook once and then you can use it anywhere to make as many drop down boxes automatically as your app needs. This useDropDown hook is a component that you can use in other apps too making your code reusable. In this video, we use our custom hook useDropDown to make a drop down box of charts that we also show how to make using Chart.js The user can select any chart from the drop down box and the data retreived from the API will be showin in one of the following charts: Bar chart, HorizontalBar, Pie diagram, Polar, Radar chart, Line chart, and Doughnut chart.
    You also learn how to use useEffect and useState hook apart from fetching data from a REST API endpoint and displaying them graphically to the users.
    Other video in this series are:
    Part 1: • React Covid 19 complet...
    Part 2: • React Covid 19 complet...
    Part 3: • React Covd 19 complete...
    Part 4: • React Covid 19 complet...
    Part 5: • React Covid19 complete...
    Part 6: • React Covid19 complete...
    --------------------
    Other complete projects that use React hooks:
    www.youtube.co....
    --------------------
    If you want to support the channel:
    Bitcoin (BTC):
    32d4wmxD9BfcHKJSRp4x8mCPRnjvCrXWk5
    Bitcoin Cash (BCH):
    Qzclr898wn9xaetpzew8f96sz9zr4ha0353zx55ptl
    Ethereum (ETH):
    0xA992193aaF853D995e733B9C71F9E8E027FCE0d6
    Litecoin (LTC):
    MQEWmtxhMjh6eGxbhTy4dw9jSo6auJyupm
    BAT (Basic Attention Token):
    0xd06BFBAFf846C28362cf28F9e9Ae98AF82860D38
    --------------------

ความคิดเห็น •