File size: 975 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 24 25 26 27 28 |
# Query Billing Transactions
`<QueryBillingTransactions />` is a React component used in managing network requests for billing transactions.
## Usage
Render the component as a child in any component. 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 QueryBillingTransactions from 'calypso/components/data/query-billing-transactions';
import MyBillingTransactionsList from './list';
export default function MyBillingTransactions( { billingTransactions } ) {
return (
<div>
<QueryBillingTransactions />
{ billingTransactions.map( ( billingEntries, billingEntryType ) => {
return <MyBillingTransactionsList items={ billingEntries } />;
} ) }
</div>
);
}
```
## Props
- `transactionType?: 'past' | 'upcoming'`: Optionally limit the type of billing transactions returned.
|