How to change grafana react version?

Hi, I’m creating grafana panel plugin and I’m defining react version as 18, but when used in grafana it uses React version 16. My dependencies need react 18. How can I change it?


image

Hi,

Why would you want to do that (18 RC at that!) ? Your dependencies do not have versions for react 16 ?

Otherwise

  1. clone grafana itself locally
  2. change package.json to react 18
  3. install dependencies/build/make locally and see what happens. (most probably things will break)
  4. It things do not break then develop and deploy your plugin again this grafana with react 18

Hi.

The method Yosiasz mentioned will work but keep in mind, react is a dependency provided by the Grafana runtime. so even if you manage to change your own grafana development clone to a newer react, if you try to load your plugin in other grafana instances they’ll be using the default one (which at the time of me writing this is 16).

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.