<p dir="auto">Hello,</p>
<p dir="auto">After updating to React 15.0.1, we are getting the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught TypeError: Cannot read property 'addEventListener' of null"><pre class="notranslate"><code class="notranslate">Uncaught TypeError: Cannot read property 'addEventListener' of null
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4996164/14602577/5bb4e9f2-0571-11e6-9aa1-98de49f50d76.png"><img src="https://cloud.githubusercontent.com/assets/4996164/14602577/5bb4e9f2-0571-11e6-9aa1-98de49f50d76.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I'm having a hard time narrowing a repro down for this and there seem to be a lot of required moving parts, so I'll try to give as much information as I can.</p>
<p dir="auto">Relevant snippet of package.json:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    &quot;react&quot;: &quot;15.0.0-rc.2&quot;, // repros w/ 0.14.7 as well
    &quot;react-dom&quot;: &quot;15.0.0-rc.2&quot;,
    &quot;react-redux&quot;: &quot;4.0.6&quot;,
    &quot;react-router&quot;: &quot;2.0.0-rc5&quot;,
    &quot;react-router-redux&quot;: &quot;4.0.0-rc.1&quot;,
    &quot;redux&quot;: &quot;3.2.1&quot;,"><pre class="notranslate"><code class="notranslate">    "react": "15.0.0-rc.2", // repros w/ 0.14.7 as well
    "react-dom": "15.0.0-rc.2",
    "react-redux": "4.0.6",
    "react-router": "2.0.0-rc5",
    "react-router-redux": "4.0.0-rc.1",
    "redux": "3.2.1",
</code></pre></div>
<p dir="auto">Our routes look something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="      &lt;Route component={App}&gt;
        &lt;Route component={LayoutNoFooter}&gt;
          &lt;Route component={Page2} /&gt;
        &lt;/Route&gt;
        &lt;Route component={Layout}&gt;
          &lt;Route component={Page1} /&gt;
        &lt;/Route&gt;
      &lt;/Route&gt;"><pre class="notranslate"><code class="notranslate">      &lt;Route component={App}&gt;
        &lt;Route component={LayoutNoFooter}&gt;
          &lt;Route component={Page2} /&gt;
        &lt;/Route&gt;
        &lt;Route component={Layout}&gt;
          &lt;Route component={Page1} /&gt;
        &lt;/Route&gt;
      &lt;/Route&gt;
</code></pre></div>
<p dir="auto"><code class="notranslate">LayoutNoFooter</code> simply wraps <code class="notranslate">Layout</code> and passes an additional prop in.</p>
<p dir="auto">I have this component in the <code class="notranslate">Header</code>, which is rendered by <code class="notranslate">Layout</code>: <a href="https://gist.github.com/aaronjensen/86c9643ecc53ad4e9006">https://gist.github.com/aaronjensen/86c9643ecc53ad4e9006</a></p>
<p dir="auto"><code class="notranslate">Header</code> is a react-redux connected component.</p>
<p dir="auto"><code class="notranslate">Page1</code> has a <code class="notranslate">componentWillUnmount</code> that dispatches an action that ultimately toggles <code class="notranslate">searchMode</code> in <code class="notranslate">HeaderLogo</code>.</p>
<p dir="auto">When I go from <code class="notranslate">Page1</code> to <code class="notranslate">Page2</code> the invariant violation fires.</p>
<p dir="auto">If I <code class="notranslate">setTimeout</code> the action dispatch in <code class="notranslate">componentWillUnmount</code> it appears to work fine. If I replace <code class="notranslate">LayoutNoFooter</code> with <code class="notranslate">Layout</code> it appears to work fine.</p>
<p dir="auto">The invariant violation is on the <code class="notranslate">img</code> tag of the <code class="notranslate">HeaderLogo</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/aab67ffd8f67c5db063610297e65c018785cf74d0d56cda5957517591e664964/68747470733a2f2f73637265656e73686f74732d647833372e73332e616d617a6f6e6177732e636f6d2f6d6f6e6f736e61702f496e746567726174696f6e5f546573745f5f486f74656c5f526573756c74735f323031362d30332d32385f32322d33352d31342e706e67"><img src="https://camo.githubusercontent.com/aab67ffd8f67c5db063610297e65c018785cf74d0d56cda5957517591e664964/68747470733a2f2f73637265656e73686f74732d647833372e73332e616d617a6f6e6177732e636f6d2f6d6f6e6f736e61702f496e746567726174696f6e5f546573745f5f486f74656c5f526573756c74735f323031362d30332d32385f32322d33352d31342e706e67" alt="stack" data-canonical-src="https://screenshots-dx37.s3.amazonaws.com/monosnap/Integration_Test__Hotel_Results_2016-03-28_22-35-14.png" style="max-width: 100%;"></a></p>
<p dir="auto">I've tried building a repro in codepen, with a similar structure <code class="notranslate">setState</code> calls to simulate react-router and redux, but I suspect they are doing more that would require me to actually build a repro w/ those technologies. If that would be helpful, I can work on it over time and hopefully repro it. Maybe there's enough info here, however. Thanks!</p>