Last active
August 14, 2020 13:48
-
-
Save skflowne/b1c43136bb6dcd6f5a50f19b18474429 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import { useRecoilValue } from "recoil" | |
import { countriesQuery } from "../state/api" | |
const Countries = () => { | |
const countries = useRecoilValue(countriesQuery) | |
return ( | |
<ul> | |
{Object.keys(countries).map((alpha2) => { | |
return <li key={alpha2}>{countries[alpha2].name}</li> | |
})} | |
</ul> | |
) | |
} | |
export default Countries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment