Here we focused on creating action and action creator. We then dispatched it.
Here is the options data:
{
method: 'GET',
url: 'https://covid-19-data.p.rapidapi.com/...,
params: {
date: '2020-04-02',
code: 'us'
},
headers: {
'x-rapidapi-key': '*****',
'x-rapidapi-host': '****'
}
}
Watch Part 7 - • 7. REACT HOOKS - TYPESCRIPT - view our con...