<h1 dir="auto">What is it</h1>
<p dir="auto">Since the hooks launch, I've been working with various teams and developers, and all of them, I repeat, ALL of them, seniors and juniors. Have been using useEffect "wrong" (considering what the react team intended). They all use the dependency array as an update array. There is no reason to keep hammering us, telling us that it is a dependency array if no one uses that way.</p>
<h1 dir="auto">What I propose</h1>
<p dir="auto">Change linters and documentation to reflect the array as an update array, not as a dependency. Maybe add a third argument that should run as an actual dependency array, that does not trigger the code inside.</p>
<p dir="auto">I've built a task execution pipeline utilizing React v14 and I've begun testing it against React v15 and have noticed that all of a sudden I'm getting an invariant error: <em>React DOM tree root should always have a node reference</em>.</p>
<p dir="auto">When I comment the line that is causing this error (</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/facebook/react/blob/3b96650e39ddda5ba49245713ef16dbc52d25e9e/src/renderers/dom/client/ReactDOMComponentTree.js#L171">react/src/renderers/dom/client/ReactDOMComponentTree.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 171
      in
      <a data-pjax="true" class="commit-tease-sha" href="/facebook/react/commit/3b96650e39ddda5ba49245713ef16dbc52d25e9e">3b96650</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L171" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="171"></td>
          <td id="LC171" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">invariant</span><span class="pl-kos">(</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
) everything works as it did with v14, and all of my unit tests pass. I assume this check is important to the new internal updates that have been made since v14.<p></p>
<p dir="auto">I was able to make it work with a hacky bit of code that adds properties to the instance, <code class="notranslate">_flags</code> and <code class="notranslate">_nativeNode</code>, you can see this here: <a href="https://github.com/mbrio/react-pipeline/blob/react-15/src/startTasks.js#L8-L9">https://github.com/mbrio/react-pipeline/blob/react-15/src/startTasks.js#L8-L9</a>.</p>
<p dir="auto">I believe the issue is that with v14 I was able to use the server rendering code but in v15 I can no longer call <code class="notranslate">forceUpdate</code> or <code class="notranslate">setState</code> without errors occurring. Is there a way of bypassing the above error using the client renderer, or a way of calling <code class="notranslate">setState</code>/<code class="notranslate">forceUpdate</code> with the server renderer?</p>