app,create-app: update to use AppRouter

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-12-07 22:56:07 +01:00
parent e0d9c9559a
commit d9b3753f87
3 changed files with 19 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
---
'@backstage/create-app': patch
---
Updated the app template to use the new `AppRouter` component instead of `app.getRouter()`.
To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`:
```diff
-import { FlatRoutes } from '@backstage/core-app-api';
+import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
...
const AppProvider = app.getProvider();
-const AppRouter = app.getRouter();
```