docs: tweak feature-flags docs

This commit is contained in:
Patrik Oldsberg
2020-10-29 15:51:54 +01:00
parent cbab5bbf8a
commit b1b3f094f1
+2 -2
View File
@@ -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 (