react-code-dataset
/
wp-calypso
/client
/components
/data
/query-jetpack-scan-threat-counts
/README.md
Query Jetpack Scan Threat Counts
<QueryJetpackScanThreatCounts /> is a React component used in managing network requests for Jetpack Scan Threat Counts.
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 QueryJetpackScanThreatCounts from 'calypso/components/data/query-jetpack-scan-threat-counts';
import Scan from './scan';
export default function MyJetpackScanThreatCounts( { jetpackScanThreatCounts } ) {
return (
<div>
<QueryJetpackScanThreatCounts siteId={ 12345678 } />
<ScanThreatCounts threatCounts={ jetpackScanThreatCounts } />
</div>
);
}
Props
siteId
| Type | Number |
|---|---|
| Required | Yes |
The site ID for which Jetpack Scan Threat Counts should be requested.