title: React.Children does not display children
body: <p>I want to use <a href="https://github.com/venits/react-native-map-clustering" rel="nofollow noreferrer">react-native-maps-clustering</a> but this one only takes markers which are direct children of maps.</p>
  <p>like the example</p>
  <pre><code>&lt;MapView&gt;
    &lt;Marker/&gt;
    &lt;Marker/&gt;
  &lt;/MapView&gt;
  </code></pre>
  <p>In my case my markers are in another file nested in other elements</p>
  <pre><code>&lt;MapView&gt;
    &lt;MarkersLayer/&gt;
  &lt;/MapView&gt;
  </code></pre>
  <p><strong>MarkersLayer.tsx</strong></p>
  <pre><code>&lt;Fragment&gt;
    &lt;Trajectory/&gt;
   &lt;Fragment&gt;
    &lt;Marker&gt;
       &lt;MarkerStyle/&gt;
    &lt;Marker/&gt;
   &lt;/Fragment&gt;
  &lt;/Fragment&gt;
  </code></pre>
  <p><em>Test : In the library - ClusteredMapView.js - l.84</em></p>
  <pre><code>      propsChildren.forEach((child, index) =&gt; {
          //my test
          if (child.type?.name == &quot;MarkersLayer&quot;){
            console.log('I am MarkersLayer')
            React.Children.forEach(child, ch =&gt; {
              console.log(&quot;child MarkersLayer&quot;, ch)
            })
          }else if (child.props.coordinate){
            console.log(&quot;I am a marker&quot;, child)
          }
           //end
          if (isMarker(child)) {
            rawData.push(markerToGeoJSONFeature(child, index));
          } else {
            otherChildren.push(child);
          }
        });
  </code></pre>
  <p>Children in MapView :</p>
  <p><a href="https://i.stack.imgur.com/zJwri.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zJwri.png" alt="enter image description here" /></a></p>
  <p>Children in MarkerLayer :</p>
  <p><a href="https://i.stack.imgur.com/JBgKV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JBgKV.png" alt="enter image description here" /></a></p>
  <p><em>Test : In my MarkerLayer component</em></p>
  <pre><code>  const propsChildren = useMemo(
      () =&gt; React.Children.toArray(children),
      [children],
    );
  </code></pre>
  <p>Result :</p>
  <p><a href="https://i.stack.imgur.com/M5soy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M5soy.png" alt="enter image description here" /></a></p>
  <p>The library uses React.Children to find the children contained in MapView but I can't get the markers in MarkerLayer.</p>
  <p>Thanks for the people reading this post and for the answers :)</p>