|
Download wp-calypso/client/components/data/query-countries/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 701 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-countries/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/data/query-countries/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-countries/README.md
701 Bytes
| # 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> | |
| ); | |
| } | |
| ``` | |