Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
return React.createElement(MapContext.Consumer, {}, (map) => {
if (map) {
// $FlowFixMe
this._map = map;
}
return null;
});
}
}
render() {
return createElement(MapContext.Consumer, {}, (map) => {
if (map) {
this._map = map;
}
if (this.state.clusters.length === 0) {
return null;
}
const clusters = this.state.clusters.map((cluster) => {
if (cluster.properties.cluster) {
return this._renderCluster(cluster);
}
const { type, key, props } = cluster.properties;
return createElement(type, { key, ...props });
});