📈 Get Statistics for 🦠  COVID19 Harnessing the Power of  ⚛️ React Hooks
Tags: opensource, webdev, codenewbie, react
Published: 2020-04-07 06:21:38



## Inspiration :

Corona Virus is a global pandemic that has spread across the globe. Most countries in the world are in a lock-down state. 

These days I am also working from home. I saw `corona-cli` by @mrahmadawais. So, I thought why shouldn't I write a react library which gives the latest statistics related to COVID19 and that's how `react-covid-hooks` library was born.

<h4 align="center">
    <a href="https://github.com/iamsaeeddev/react-covid-hooks">
        <img src="https://raw.githubusercontent.com/iamsaeeddev/react-covid-hooks/master/logo.png">
    </a>

<br/>
<br/>

📈 Statistics for 🦠 COVID19 harnessing the power of ⚛️ React Hooks

</h4>
<br/>


# react-covid-hooks
> 📈 Get Statistics for 🦠  COVID19 Harnessing the Power of  ⚛️ React Hooks

- 🚀 get overall statistics, country-wise, state-wise (US) and statistics till yesterday
- 🦠 get overall statistics for COVID19
- 🇺🇸 get updated statistics for all US states
- 🗺️ get statistics for all countries of the world 
- ⏮️ get updates statistics for yesterday
- 📈 For overall statistics, Data : updated (Time Stamp), cases, todayCases, deaths, todayDeaths, recovered, active, critical, casesPerOneMillion, deathsPerOneMillion, tests, testsPerOneMillion, affectedCountries
- 📈 For all states of the US, Data : state, cases, todayCases, deaths, todayDeaths, active, tests, testsPerOneMillion
- 📈 For all countries of the world, Data : country, countryInfo, updated, cases, todayCases, deaths, todayDeaths, recovered, active, critical, casesPerOneMillion, deathsPerOneMillion, tests, testsPerOneMillion
- 📈 For statistics till yesterday, Data : country, countryInfo, updated, cases, todayCases, deaths, todayDeaths, recovered, active, critical, casesPerOneMillion, deathsPerOneMillion, tests, testsPerOneMillion

GitHub Link: https://github.com/iamsaeeddev/react-covid-hooks
NPM Link: https://www.npmjs.com/package/react-covid-hooks

## 📥 Install

```
npm install react-covid-hooks
```


## 💅 Usage

### 📈 All Statistics

```
import { useAll } from 'react-covid-hooks';

const allStats = useAll();
```

### 📈 Country-wise Statistics

```
import { useCountries } from 'react-covid-hooks';

const allCountries = useCountries();
```

### 📈 State-wise Statistics 

```
import { useStates } from 'react-covid-hooks';

const allStates = useStates();
```

### 📈 Statistics till Yesterday

```
import { useYesterday } from 'react-covid-hooks';

const yesterdayStats = useYesterday();
```

## 🗒️ Changelog

Changelog exists in the [releases](https://github.com/iamsaeeddev/react-covid-hooks/releases) tab


## ⚙️ Contributions

Contributions/PRs/Feedback is welcome


## 📔 License

This library is release under [MIT License](https://github.com/iamsaeeddev/react-covid-hooks/blob/master/LICENSE)


## ⛓️ Connect

💻 Want to get updated on latest trends in Open Source? Follow me on [GitHub](https://github.com/iamsaeeddev).

🐦 Want to get help or discuss something? Get connected on [Twitter](https://twitter.com/iamsaeeddev)! 

📖 Want to read my articles? Visit my [DEV blog](https://dev.to/iamsaeeddev)!

🏢 Want to see my professional journey? Let's Connect on [LinkedIn](https://www.linkedin.com/in/iamsaeeddev) 

## Usage in Twilio Hackathon

![Twilio Hackathon](https://dev-to-uploads.s3.amazonaws.com/i/nifvpea2hzb5y7kethzt.png)

If you are working on a React app and want to use some statistics related to COVID19, then you should consider using this package.

Alongside this, feel free to contribute to it if you feel something's missing or it can be improved. 

Just connect with me and Let's discuss!