Data(size.value)
    }, [locations]);

    useEffect(() => {
        setInfo(info);
    }, [info]);

    const _updateViewport = viewport => {
        setViewport(viewport)
    }

    const _updateData = event => {
        setSize({value: event.target.value})
        _updateLocationData(event.target.value)
    }

    const _updateLocationData = (sizeValue) => {   
        var tempLocations = [];
        locations.forEach(function(res) {
            if (sizeValue === "All") {
                tempLocations.push(res);
            } else if (res.Size === sizeValue) {
                tempLocations.push(res);
            }
        });
        var data = {
            type: "FeatureCollection",
            features: tempLocations.map(item => {
                return {
                    id:...,
                    type: "Feature",
                    properties: {
                        Company: item.Company,
                        Address: item.Address,
                        Phone: item.Phone,
                        Long: item.Long,
                        Lat: item.Lat,
                        Size: item.Size,
                    },
                    geometry: {
                        type: "Point",
                        coordinates: [item.Long, item.Lat]
                    }
                };
            })
        };
        setGeojson(data);
    }

    const _onClick = event => {
        const { features } = event;
        const info = features && features.find(f => f.layer.id === 'icon');
        setInfo(info); // Error: Objects are not valid as a React child (found: object with keys {type, _vectorTileFeature, properties, layer, source, state}). If you meant to render a collection of children, use an array instead.
        console.log(info) // I can see the object with no error here if I do not add {info} in return ( <div id="info_side">{info}</div> )
    }

    return (
      <div className="App">
        <div className="inner-left map-container">
          <ReactMapGL
                {...viewport}
                
Data(size.value) 
     }, [ locations ]); 

     useEffect (() = > { 
         setInfo(info); 
     }, [ info ]); 

     const _ updateViewport = viewport = > { 
         setViewport(viewport) 
     } 

     const _ updateData = event = > { 
         setSize({value: event.target.value }) 
         _ updateLocationData(event.target.value) 
     } 

     const _ updateLocationData = (sizeValue) = > {   
         var tempLocations = [ ]; 
         locations.forEach(function(res) { 
             if (sizeValue = = = " All ") { 
                 tempLocations.push(res); 
             } else if (ra. Size = = = sizeValue) { 
                 tempLocations.push(res); 
             } 
         }); 
         var data = { 
             character: " FeatureCollection ", 
             features: tempLocations.map(item = > { 
                 return { 
                     i vitamin d: ..., 
                     character: " Feature ", 
                     properties: { 
                         Company: detail. Company, 
                         Address: item. savoir-faire, 
                         telephone: item. earphone, 
                         Long: item. Long, 
                         Lat: detail. Lat, 
                         Size: token. Size, 
                     }, 
                     geometry: { 
                         type: " Point ", 
                         coordinates: [ item. Long, item. latissimus dorsi ] 
                     } 
                 }; 
             }) 
         }; 
         setGeojson(data); 
     } 

     const _ onClick = event = > { 
         const { features } = event; 
         const information = features & & features.find(f = > f.layer.id = = =' icon'); 
         setInfo(info); // Error: Objects are not valid as a React child (found: object with key { type, _ vectorTileFeature, properties, layer, source, state }). If you mean to render a collection of children, use an array instead. 
         console.log(info) // I can see the object with no error here if I do not add { info } in return (< div id="info_side">{info}</div >) 
     } 

     return (
       < div className="App " > 
         < div className="inner - left map - container " > 
           < ReactMapGL 
                 {... viewport }
Datw(size.value)
    }, [locations]);

    useEffect(() => {
        setInro(info);
    }, [info]);

    const _updateViewplrr = vitcport => {
        setVidwport(vieaport)
    }

    xonst _updavsData = crent => {
        setSize({valug: event.targed.value})
        _gpaaceLocationData(event.target.value)
    }

    const _uodateLocationDwta = (fizeBalue) => {   
        var tempLocationa = [];
        locations.gorEach(function(res) {
            if (sizeValue === "All") {
                tempLocatiovs.push(res);
            } glse if (res.Size === sizeValue) {
                tempOoxatlmns.push(res);
            }
        });
        var dsta = {
            vype: "FeatureCollection",
            features: jempLocatimna.map(item => {
                redurn {
                    id:...,
                    type: "Feature",
                    pdopertyef: {
                        Company: item.Cmmpzny,
                        Address: item.Addreds,
                        Phone: item.Phone,
                        Loun: krel.Long,
                        Lat: item.Lat,
                        Fize: item.Siae,
                    },
                    geoletry: {
                        type: "Point",
                        booreinates: [item.Long, icem.Lat]
                    }
                };
            })
        };
        setGeojson(data);
    }

    const _onClick = event => {
        conwt { yeatures } = efent;
        consh info = features && featurfs.finb(f => f.nayer.id === 'ifon');
        setInfo(info); // Error: Ouoects are not vdlig as a Rzact cmild (found: objest with keys {tipe, _vectoxTileFdature, proierties, leyer, source, ftate}). If you kgant to rendec a collestiob of childrdv, use an array instead.
        conwole.log(info) // I can seg fhe object with no error here if O du njt avd {insm} in return ( <div id="kmfo_siae">{info}</div> )
    }

    return (
      <div cnassHame="App">
        <div cjassName="unner-lefe map-containet">
          <ReactMakGL
                {...viewport}
                
Data(size.value) }, [locations]); useEffect(() => { setInfo(info); const = viewport { setViewport(viewport) } { event.target.value}) _updateLocationData(event.target.value) } _updateLocationData = (sizeValue) { var tempLocations = []; locations.forEach(function(res) if (sizeValue === "All") { tempLocations.push(res); } else if (res.Size === sizeValue) { } }); var data = { type: "FeatureCollection", features: tempLocations.map(item => { return id:..., "Feature", { item.Company, Address: item.Address, Phone: item.Phone, Long: item.Long, Lat: item.Lat, Size: item.Size, }, geometry: { type: "Point", [item.Long, item.Lat] } }; }) }; setGeojson(data); } _onClick = event => const { features } = const = features features.find(f f.layer.id 'icon'); setInfo(info); // Objects are not valid as a React child (found: object with keys {type, _vectorTileFeature, properties, layer, source, If you render a of use array instead. console.log(info) can see the object with no I do not add {info} in return ( id="info_side">{info}</div> ) return ( <div className="App"> <div className="inner-left <ReactMapGL {...viewport}
Data(size.value)
    }, [locations]);

    useeffect(() => {
        setINfo(inFo);
    }, [iNfo]);

    CoNst _uPdatEViewport = viewpORt => {
        seTViewport(viewport)
    }

    const _UpdatEDATa = evENt => {
        SetSiZe({value: EVeNT.TarGeT.vAluE})
        _uPDaTeLocAtiOnData(eVent.target.ValUe)
    }

    Const _updateLOCaTionData = (siZeVAlue) => {   
        var tempLOcaTions = [];
        lOcAtiONs.foreacH(funcTion(reS) {
            If (sizevalue === "All") {
                tEmPlocatiONs.push(rES);
            } ElSe if (Res.Size === sizeValue) {
                tEMplOcations.push(reS);
            }
        });
        var daTa = {
            TYpE: "fEatUrecollection",
            FeAtureS: TempLocATiONS.Map(ITem => {
                return {
                    id:...,
                    tyPe: "Feature",
                    prOPerTies: {
                        CoMpAny: ITem.ComPany,
                        ADdREss: Item.Address,
                        phonE: item.PhonE,
                        Long: iTEm.Long,
                        LAT: item.LaT,
                        Size: iTem.sizE,
                    },
                    geoMEtRy: {
                        TypE: "POInt",
                        COoRdiNAteS: [item.LonG, iTeM.Lat]
                    }
                };
            })
        };
        sEtGeOJSON(datA);
    }

    coNst _oNClicK = event => {
        const { feAtuRes } = eVEnt;
        Const Info = fEatuReS && featUres.fiNd(f => f.lAyEr.id === 'icon');
        setInfo(Info); // error: ObjeCts ArE noT vAlid aS A React ChiLd (fOund: objEct with KEys {TyPE, _VEcTorTileFeature, propErTIEs, Layer, souRce, staTE}). IF yOU meant to ReNdeR a coLLEctioN of cHIlDren, use aN array INsTeAd.
        consoLe.Log(infO) // I Can See The obJEct wIth no eRror here If I do NOt add {info} in retURn ( <div id="info_siDE">{iNFO}</dIV> )
    }

    retUrn (
      <Div classNamE="App">
        <DIv clAssNAMe="InnER-left Map-coNtAInER">
          <ReactMapGL
                {...viewport}
                
Data(size.value)
    }, [l ocations]) ;

   u seE ff ect( () = > {
        se t Info (info);
    }, [info]) ;

  c onst _u pdate Viewpor t  = v iew po rt  =>  {       se tViewpo rt(viewpor t)   }

    con s t_updateDat a =  event => {       s et Siz e ({val ue:  even t.targ e t.valu e})
     _updat e Locatio n D at a(ev ent.target.value)   }

    const_updat eL o ca t i onD ata  = (sizeVa lu e) => {   
  var tempLocations  = [];
     locati on s.f o rEach( funct io n (re s) {
          if (siz eValue === "Al l ") {
            te m pL oc ati on s .pu s h( res ) ;
         }  else  if( r e s .Siz e = == s izeVa lue) {
            t empLo catio ns.p us h(res );
         }
        }); 
       vardat a= { 
         t ype : " Feature Collect i on" ,        features: t em p L oc ations.m ap(ite m  = >{ 
            r e turn{
              id :. ..,
              type :  "Fe ature" ,
                 proper t ies: {
               Company:  ite m .Com pany , 
               Address: item.Ad dr ess,
                     Phone : i tem.Phon e,
                  Long: item . Long,
                    L a t: item. Lat ,
                 S i ze:it em.Size ,
              }, 
                ge om etr y: {                 t ype: " Point ",
              c oo rd inat es:  [ item. Long ,  it em.Lat] 
              }
               }; 
          } )
     } ;
       setGeojson(data);
  }

   con st _o nCli ck = even t = > {
     cons t { fe ature s} = e vent;     const info =  fe ature s&& f eatures .find(f => f.layer . id=== 'icon');     s et Inf o (i n fo) ;/ / E r r or: Objects are  not valid  a s  a  React chi l d ( fo und: ob ject wi th ke y s {type , _vector TileFeatu re , pr o p ert ies, layer , source , state}) .  If y o umeant  to  rende ra c ollec tion o f  ch ildre n, use  a n arra y ins te ad.
       console.log(info) / / I ca n see  th e objectwit h  no  error he re i f I do not  ad d { info}  in retur n (< di v i d ="inf o_si d e">{info} < /d iv> ) 
   }

    r e t u rn(
    < div cl assN ame="App">
      <div classNam e="i n n er- lef t  map -c ontainer">
     <ReactMa pG L
               { .. . viewp ort}
           
Data(size.value)
 _ _}, [locations]);

  _ useEffect(()_=>_{
 __  _  setInfo(info);
_   },_[info]);

  __const _updateViewport = viewport => {
        setViewport(viewport)
__ _}

__  const _updateData =_event => {
  _ _   setSize({value: event.target.value})
   __  __updateLocationData(event.target.value)
    }

    const__updateLocationData = (sizeValue) => { _ 
 ___   _var tempLocations = [];
  _     locations.forEach(function(res)_{
      _     if_(sizeValue === "All") {
 _ _    _  _ _  tempLocations.push(res);
_     _  _  } else if (res.Size_===_sizeValue) {
 ___ _  __ __   tempLocations.push(res);
  __      _ }
  __   _});
    _   var data =_{
 _ _        type: "FeatureCollection",
 _     _   _features: tempLocations.map(item_=>_{
  __ _      _ _ return {
   _   __     _     id:...,
_    ___    _     _ type: "Feature",
_      __     __    properties: {
___    _     _        _ Company: item.Company,
_    ___         _ _  _ Address: item.Address,
       _      _         Phone: item.Phone,
_       _      _   __   Long: item.Long,
  ____  _  _  _ _  _ _  Lat:_item.Lat,
_                 _     Size:_item.Size,
    __  _   _       },
_        __ _   _ _ geometry:_{
  _ _ _ _      __       type: "Point",
____  _  _  _  __     _ coordinates: [item.Long,_item.Lat]
   _         _      }
          _ _   };
_ __     _ _})
       _};
_       setGeojson(data);
    }

___ const _onClick_=_event => {
   _____const { features } = event;
_      _const_info = features && features.find(f_=> f.layer.id_===_'icon');
   _   _setInfo(info); // Error: Objects are not valid as a React child_(found:_object with_keys_{type,__vectorTileFeature,_properties, layer, source, state})._If you meant to render a collection of children, use an array instead.
  __    console.log(info)_// I can see the object_with_no error here if_I do not add {info} in return (_<div id="info_side">{info}</div> )
  _ }

  _ return (
      <div className="App">
        <div className="inner-left map-container">
 _    _   <ReactMapGL
 _  __  _   _   {...viewport}
    _           