Add clarifying comment for use of fetchApiRef
Signed-off-by: Joshua Jung <joshua.p.jung@gmail.com>
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user