title: How to subscribe to object changes?
body: <p>I wonder how to subscribe to the changes of a JavaScript object e.g. like Redux does. I read through a lot of JS documentations but I couldn't find a non-deprecated way to handle this problem (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch" rel="noreferrer"><code>Object.protype.watch()</code></a> as well as <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe" rel="noreferrer"><code>Object.observe()</code></a> are deprecated). Moreover I read a few Stackoverflow questions regarding this topic but they are all at least 5 years old. To visualize my problem I'll show an example. </p>
  
  <p>This could be an object I want to watch for:</p>
  
  <pre><code>const store = {
      anArray = [
      'Hi',
      'my',
      'name',
      'is'
    ]
  }
  </code></pre>
  
  <p>.. and this a function which changes the <code>store</code> object:</p>
  
  <pre><code>function addAName() {
      store.anArray.push('Bob')
  }
  </code></pre>
  
  <p>My goal in this example is to trigger the following function every time the <code>store</code> object changes</p>
  
  <pre><code>function storeChanged() {
      console.log('The store object has changed!')
  }
  </code></pre>
  
  <p>Thank you in advance!</p>