Merge pull request #27189 from joshjung/jjung/clarifying-comment

Add clarifying comment for use of fetchApiRef
This commit is contained in:
Fredrik Adelöw
2024-10-22 12:24:30 +02:00
committed by GitHub
@@ -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');