<p dir="auto"><a href="https://github.com/facebook/react/pull/5744" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/5744/hovercard">facebook/react/pull/5744</a></p>
<p dir="auto">It seems with the newest update v15 when passing props into a child component with the spread operator the console throws the warnings associated with this pull request.</p>
<p dir="auto">seems to only throw issue when the component is not a class but only stateless component hence passing just {...props} and not {...this.props}</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6943688/14372403/141329b2-fcf5-11e5-9ef8-7cc2ae19a571.png"><img src="https://cloud.githubusercontent.com/assets/6943688/14372403/141329b2-fcf5-11e5-9ef8-7cc2ae19a571.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I am not accessing refs or keys in the child component</p>
<p dir="auto">React version: 16.13.1</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li>In a project with React, and react-leaflet@2.7.0</li>
<li></li>
</ol>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from &quot;react&quot;;
import Renderer from &quot;react-test-renderer&quot;;
import { Map, TileLayer } from &quot;react-leaflet&quot;;

let component = Renderer.create(
    &lt;Map&gt;
      &lt;TileLayer
        attribution='&amp;copy; &lt;a href=&quot;http://osm.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt; contributors'
        url=&quot;https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png&quot;
      /&gt;
    &lt;/Map&gt;
  );"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">"react"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-smi">Renderer</span> <span class="pl-k">from</span> <span class="pl-s">"react-test-renderer"</span><span class="pl-kos">;</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Map</span><span class="pl-kos">,</span> <span class="pl-smi">TileLayer</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"react-leaflet"</span><span class="pl-kos">;</span>

<span class="pl-k">let</span> <span class="pl-s1">component</span> <span class="pl-c1">=</span> <span class="pl-smi">Renderer</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span>
    <span class="pl-kos">&lt;</span><span class="pl-smi">Map</span><span class="pl-kos">&gt;</span>
      <span class="pl-c1">&lt;</span><span class="pl-smi">TileLayer</span>
        <span class="pl-smi">attribution</span><span class="pl-c1">=</span><span class="pl-s">'&amp;copy; &lt;a href="http://osm.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors'</span>
        <span class="pl-s1">url</span><span class="pl-c1">=</span><span class="pl-s">"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"</span>
      <span class="pl-c1">/</span><span class="pl-c1">&gt;</span>
    <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Map</span><span class="pl-c1">&gt;</span>
  <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>

<p dir="auto">Link to code example: <a href="https://codesandbox.io/s/react-test-renderer-leaflet-mohzp" rel="nofollow">https://codesandbox.io/s/react-test-renderer-leaflet-mohzp</a></p>

<h2 dir="auto">The current behavior</h2>
<p dir="auto">It raise an error <code class="notranslate">Map container not found.</code></p>
<h2 dir="auto">The expected behavior</h2>
<p dir="auto">Enzyme's <code class="notranslate">attachTo</code> option allow to mount the comment in a more realistic environment, which fixes this bug. But there is no equivalent feature in <code class="notranslate">react-test-renderer</code> as far as I know.</p>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="186798181" data-permission-text="Title is private" data-url="https://github.com/PaulLeCam/react-leaflet/issues/246" data-hovercard-type="issue" data-hovercard-url="/PaulLeCam/react-leaflet/issues/246/hovercard" href="https://github.com/PaulLeCam/react-leaflet/issues/246">PaulLeCam/react-leaflet#246</a> for more info about the Enzyme fix for this issue.</p>
<p dir="auto">It should render the map as expected.</p>