From debbf2808dd4548fb6e7aeafbfaaf188fc98dc45 Mon Sep 17 00:00:00 2001 From: Jaylou Rasonabe <100252318+JlordS32@users.noreply.github.com> Date: Sun, 14 May 2023 17:39:12 +1000 Subject: [PATCH] Update 25_custom_hooks.md --- 25_Custom_Hooks/25_custom_hooks.md | 86 +++++++++++++++++------------- 1 file changed, 48 insertions(+), 38 deletions(-) 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
+