title: Listen to a div change in react
body: <p>I have a case where a user can close a page in my react webapp, and i want to show a popup if changed has been made "Are you sure you want to close the page". To be clear i'm not talking about a web browser page, but a page/tab in my app.</p>
  
  <p>Everything is set up and working using a button to simulate changes. The problem is i just want to find a way to listen to an entire div if there were change in it the DOM, in order to not put an action in every input of this div. If someone know a good way to do that i'll be glad to hear it. Thanks in advance.</p>
  
  <p>(I use the js library lodash, but didn't find anything that helped me, but maybe i passed it too quickly).</p>
  
  <p>EDIT
  example of the div : </p>
  
  <pre><code>&lt;div&gt;
      &lt;input value="Bob"&gt;
      &lt;input value="Brian"&gt;
      &lt;input value="Anna"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to know when user change the input </p>