Add clarifying comment for use of fetchApiRef

Signed-off-by: Joshua Jung <joshua.p.jung@gmail.com>
This commit is contained in:
Joshua Jung
2024-10-16 09:06:10 -05:00
parent 8b1b2cfe4b
commit b3f03e28bd
@@ -32,6 +32,8 @@ It uses `cross-fetch` internally. Example:
```ts
import { useApi } from '@backstage/core-plugin-api';
// Inside some functional React component...
const { fetch } = useApi(fetchApiRef);
const response = await fetch('https://example.com/api/v1/users.json');