title: React-leaflet problem to create <Marker> <Popup> instance dynamic
body: <p>I would like to create a react-leaflet object dynamically. Normal leaflet objects work, but react-leaflet do not.
  Code example on:
  <a href="https://codesandbox.io/s/show-problem-react-leaflet-marker-popup-object-hm0o8?file=/src/MapView.js" rel="nofollow noreferrer">https://codesandbox.io/s/show-problem-react-leaflet-marker-popup-object-hm0o8?file=/src/MapView.js</a></p>
  <p>Left click shows the desired behavior with leaflet objects and right click the problem with react-leaflet.</p>
  <p>problem code:</p>
  <pre class="lang-js prettyprint-override"><code>var lat = e.latlng.lat;
  var lon = e.latlng.lng;
  // create popup contents
      
  // use &lt;Marker&gt; from react-leaflet
  var newMarker = &lt;Marker position={[lat, lon]}&gt;
    {/* use Edit Popup */}
    &lt;Popup editable open&gt;   
      Your stylable content here.
    &lt;/Popup&gt;
  &lt;/Marker&gt;;
      
  // Problem addTo(map) 
  newMarker.addTo(map);
  </code></pre>