title: React - Error: Target container is not a DOM element
body: <p>I just got started using React so this is probably a very simple mistake, but here we go. The following code throws me always the following message: <strong>Error: Target container is not a DOM element.</strong> Furthermore it indicates that there's something wrong with the last line (render). I'm working through a <a href="https://lingui.js.org/tutorials/react.html" rel="nofollow noreferrer">tutorial</a> for LinguiJS and I use their code so I'm confused why this is not working.</p>
  <p>I tried replacing <code>render</code> by <code>ReactDOM.render</code> and adapted the import consequently, but I received the same error. Any help would be highly appreciated!</p>
  <pre><code>//index.js
  
  import React from 'react'
  import { render } from 'react-dom'
  import Inbox from './Inbox.js'
  import catalogCs from './locales/cs/messages.js'
  
  import { I18nProvider } from '@lingui/react'
  
  const catalogs = { cs: catalogCs };
  const App = () =&gt; (
    &lt;I18nProvider language=&quot;cs&quot; catalogs={catalogs}&gt;
      &lt;Inbox /&gt;
    &lt;/I18nProvider&gt;
  )
  
  render(&lt;App /&gt;, document.getElementById('app'))
  </code></pre>
  <p>Second file:</p>
  <pre><code>//Inbox.js
  import React from 'react'
  import { Trans } from '@lingui/macro'
  import {Link} from 'react-router-dom';
  
  
  const Inbox = ({ messages, markAsRead, user }) =&gt; {
     const messagesCount = messages.length
     const { name, lastLogin } = user
  
     return (
        &lt;div&gt;
          &lt;h1&gt;&lt;Trans&gt;Message Inbox&lt;/Trans&gt;&lt;/h1&gt;
  
          &lt;p&gt;
            &lt;Trans&gt;
            See all &lt;Link to=&quot;/unread&quot;&gt;unread messages&lt;/Link&gt;{&quot; or &quot;}
            &lt;a onClick={markAsRead}&gt;mark them&lt;/a&gt; as read.
            &lt;/Trans&gt;
          &lt;/p&gt;
  
          &lt;p&gt;
            {
              messagesCount === 1
                ? `There's ${messagesCount} message in your inbox.`
                : `There're ${messagesCount} messages in your inbox.`
            }
          &lt;/p&gt;
  
          &lt;footer&gt;
            Last login on {lastLogin}.
          &lt;/footer&gt;
        &lt;/div&gt;
     )
  }
  
  export default Inbox;
  </code></pre>