title: React: Action on variable change
body: <p>is there a way how to call method on variable change(state).
  How to get List which components changed ?</p>
  
  <pre><code> componentDidUpdate(prevProps, prevState) {
  
      const {ID} = this.state
          if (this.ID !== this.previousID || this.cmbID !== this.previoudcmbID) {
              if(this.ID !== undefined &amp;&amp; this.cmbID !== undefined)
              {
                  this.reload3();
  
              //  console.log(this.prevProps)
                  console.log(this.state.settings[0])
                  console.log(this.prevState.settings[0])
  
              }
  
  
  
      }
      this.prevState = this.state;
  }
  </code></pre>