DEV Community

Discussion on: 5 React-Based Projects Every Beginner Must Try

Collapse
 
surajondev profile image
Suraj Vishwakarma
fetch("https://disease.sh/v3/covid-19/all")
        .then(response => response.json())
        .then(data => (
            this.setState(
                {
                    covid_world : data
                }
            )
        ))
    }
Enter fullscreen mode Exit fullscreen mode

I use this method to get the data from the APIs and stored them into the state. If you want to see the whole project Covid19-info for detail.

Collapse
 
yugeroh profile image
Oliver James Aco • Edited

Thank you @surajsrv11 , I already figure it out I just forgot to insert the http protocol that's why the API didn't work. I already try your project and now I'm at the 2nd one.

Thread Thread
 
surajondev profile image
Suraj Vishwakarma

That's Great, keep developing 🔥🔥🔥

Some comments have been hidden by the post's author - find out more