Skip to content

Instantly share code, notes, and snippets.

@Dromediansk
Last active December 14, 2019 21:08
Show Gist options
  • Save Dromediansk/eb22e19abd56b75c743de54ce252b50b to your computer and use it in GitHub Desktop.
Save Dromediansk/eb22e19abd56b75c743de54ce252b50b to your computer and use it in GitHub Desktop.
CountriesContainer1 react-tips
import React, { useState, useEffect } from "react";
import CountryCard from "./CountryCard";
import "./CountriesContainer.css";
const CountriesContainer = () => {
const [countries, setCountries] = useState([]);
return (
<div className="countries-container">
{countries.map(country => {
return <CountryCard key={country.numericCode} country={country} />;
})}
</div>
);
};
export default CountriesContainer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment