File size: 701 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Query Countries
`QueryDomainCountries`, and `QuerySmsCountries` are React components used in managing network requests for lists of countries.
## Usage
Render the component without props. It does not accept any children, nor does it render any elements to the page. You can use it adjacent to other sibling components which make use of the fetched data made available through the global application state.
```jsx
import QueryDomainCountries from 'calypso/components/data/query-countries/domains';
export default function CountriesList( { countries } ) {
return (
<ul>
<QueryDomainCountries />
{ countries.map( ( country ) => (
<li>{ country.label }</li>
) ) }
</ul>
);
}
```
|