|
Download wp-calypso/client/components/data/query-jetpack-modules/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 986 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-jetpack-modules/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/data/query-jetpack-modules/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-jetpack-modules/README.md
986 Bytes
Query Jetpack Modules
<QueryJetpackModules /> is a React component used in managing network requests for Jetpack site modules.
Usage
Render the component, passing siteId. 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.
import QueryJetpackModules from 'calypso/components/data/query-jetpack-modules';
import MyJetpackModulesListItem from './list-item';
export default function MyJetpackModulesList( { jetpackModules } ) {
return (
<div>
<QueryJetpackModules siteId={ 12345678 } />
{ jetpackModules.map( ( module ) => {
return <MyJetpackModulesListItem module={ module } />;
} ) }
</div>
);
}
Props
siteId
| Type | Number |
|---|---|
| Required | Yes |
The site ID for which Jetpack modules should be requested.