Determine query change in grafana plugin

I am developing a grafana plugin using reactJS. When i apply a math operator, my plugin does not re-render, i have stopped it with custom logic. Is there anything in grafana by which i can determine if anything is changed in the query from previous query, is there any info in “props” by which we can determine that query has been changed.

My issue is that i want to know that query has been changed as query will change after applying math operator. Is there any information in props regarding that ?

I have learned a lot by watching what happens in the existing react components (Gauge and Bar Gauge) with React dev tools and chrome dev tools.