Skip to content

ConfigEditor & QueryEditor mutates React props #139

@hugohaggmark

Description

@hugohaggmark

We’ve noticed that this plugin mutates React props in Grafana. For example, this line mutates the jsonData prop passed into the React component and this line mutates the query prop passed into the React component.

While this currently works in Grafana, it may not be compatible with future versions and could lead to runtime errors. To ensure long-term stability, we recommend avoiding prop mutation. You can find more details in the React docs:
https://react.dev/reference/rules/components-and-hooks-must-be-pure#props

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions