Grafana core allows plugins to start using the v6 version of react-router, and hopefully we will deprecate using v5 in plugins this year. @grafana/scenes is used by internal app plugins, which means that before migrating those we need to have a version of the scenes package that supports versions 6.x.x as well.
Why?
Grafana core allows plugins to start using the v6 version of react-router, and hopefully we will deprecate using v5 in plugins this year.
@grafana/scenes
is used by internal app plugins, which means that before migrating those we need to have a version of the scenes package that supports versions 6.x.x as well.How?
For the
scenes-app
follow our migration guide using create-plugin, and forscenes
rely on the official react-router v5->v6 migration guide.Some of the things that need too be changed: (list is not complete)
<Routes>
instead of<Switch>
render={}
prop inRoute
components, use theelement={}
prop instead and theuseParams()
hookrender={}
prop and the<Switch>
component<Switch>
component