docs: tweak feature-flags docs
This commit is contained in:
@@ -24,14 +24,14 @@ export default createPlugin({
|
||||
## Using with useApi
|
||||
|
||||
To inspect the state of a feature flag inside your plugin, you can use the
|
||||
`FeatureFlagsApi`, accessed via the `FeatureFlagsApiRef`. For example:
|
||||
`FeatureFlagsApi`, accessed via the `featureFlagsApiRef`. For example:
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { featureFlagsApiRef, useApi } from '@backstage/core';
|
||||
|
||||
const ExamplePage: FC<{}> = () => {
|
||||
const ExamplePage = () => {
|
||||
const featureFlags = useApi(featureFlagsApiRef);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user