diff --git a/23_Fetching_Data_Using_Hooks/23_fetching_data_using_hooks.md b/23_Fetching_Data_Using_Hooks/23_fetching_data_using_hooks.md index f895e8e..a7c79ba 100644 --- a/23_Fetching_Data_Using_Hooks/23_fetching_data_using_hooks.md +++ b/23_Fetching_Data_Using_Hooks/23_fetching_data_using_hooks.md @@ -36,13 +36,13 @@ import React, { useState, useEffect } from 'react' import axios from 'axios' import ReactDOM, { findDOMNode } from 'react-dom' -const Country = ({ country: { name, flag, population } }) => { +const Country = ({ country: { name, flags, population } }) => { return (
- {name} + {name.common}
-

{name.toUpperCase()}

+

{name.common.toUpperCase()}

Population: @@ -62,7 +62,7 @@ const App = (props) => { }, []) const fetchData = async () => { - const url = 'https://restcountries.eu/rest/v2/all' + const url = 'https://restcountries.com/v3.1/all' try { const response = await fetch(url) const data = await response.json()