diff --git a/25_Custom_Hooks/25_custom_hooks.md b/25_Custom_Hooks/25_custom_hooks.md index fda64e4..3e31420 100644 --- a/25_Custom_Hooks/25_custom_hooks.md +++ b/25_Custom_Hooks/25_custom_hooks.md @@ -29,55 +29,65 @@ import React, { useState, useEffect } from 'react' import axios from 'axios' import ReactDOM, { findDOMNode } from 'react-dom' -const Country = ({ country: { name, flag, population } }) => { - return ( -
- Population: - {population} -
+const Country = ({ country: { + name: { + common: country_name + }, + flags: { + png: flag_png, + alt: flag_alt + }, + population +}}) => { + return ( ++ + Population: {population.toLocaleString()} + +
+There are {data.length} countries in the api
-There are {data.length} countries in the api
+