title: Why is node.appendChild() not working?
body: <p>I have this bit of code that's later going to be used to spit out the dates in a calendar. I'm trying to do this dynamically so I can load in the dates from the current month. I'm using reactjs and I keep getting an error that appendChild is not a function. I don't see what's wrong here, according to the docs its looks correct.<a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild" rel="nofollow noreferrer"> See documentation</a></p>
  
  <pre><code>let datesContainer = document.getElementById('display')
  
  function drawCalendar() {
    for (let i = 0; i &lt; 42; i++) {
      let dateNode = document.createElement("div")
      dateNode.textContent = toString(i)
      dateNode.setAttribute("id", "dateNode" + i)
      datesContainer.appendChild(dateNode)
    }
  }
  drawCalendar()
  
  class App extends Component {
    render() {
      return (
        &lt;div className="App"&gt;
          &lt;div className="display"&gt;
            &lt;div className="d-numbers" id="display"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>