[docs] added skeleton

This commit is contained in:
Bilawal Hameed
2020-03-26 11:21:46 +01:00
parent 88a6b3d7c4
commit 8145ba8b94
3 changed files with 22 additions and 3 deletions
+6 -3
View File
@@ -17,13 +17,14 @@ type PluginHooks = {
};
```
[Read more about the router here](createPlugin-router.md)
- [Read more about the router here](createPlugin-router.md)
- [Read more about feature flags here](createPlugin-feature-flags.md)
## Example Uses
### Creating a basic plugin
Showcasing adding multiple routes and a redirect.
Showcasing adding multiple routes, a feature flag and a redirect.
```jsx
import { createPlugin } from '@backstage/core';
@@ -31,7 +32,9 @@ import ExampleComponent from './components/ExampleComponent';
export default createPlugin({
id: 'new-plugin',
register({ router }) {
register({ router, featureFlags: { registerFeatureFlag } }) {
registerFeatureFlag('enable-example-component');
router.registerRoute('/new-plugin', ExampleComponent);
},
});