": ""    
    }]
}

This is my Product component:
import React, { Component } from "react";
import Thumb from "../../../Thumb/index";

const Product = props => {
        return (
            <div className="shelf-item">
                <div className="shelf-stopper">Free shipping</div>
                <Thumb 
                    classes="shelf-item__thumb"
                    src={props.images}
                />
                <p className="shelf-item__title">product</p>
                <div className="shelf-item__price">
                    productInstallment  
                </div>
                <div className="shelf-item__buy-btn">Add to cart</div>
            </div>
        );
    }

export default Product;

Could someone help me figure it out? Thanks a lot!

A:

In your productList component you are using a promise instead of rendering child, to overcome this you can make it a stateful component fix this like:
import React, { Component } from'react';
import Product from "./Product/index";

class ProductList extends Component {
  constructor(props) {
    super(props)
    this.state = {
      goods: []
    }
  }

  componentDidMount = () => {
    import("../../../data/data.json")
     .then(json => this.state({ goods: json.goods }))
  }

  render() {
    const { goods } = this.state
    return (
      <div>
        {goods.map(image => <div><Product images={image.pictures} /></div>)}
      </div>
    )
  }
}

export default ProductList;

or alternatively you can import it in beginning like:
import React from'react';
import Product from "./Product/index";
import goods from "../../../data/data.json"

const ProductList = () => {
  const renderedGoods = goods.map(image => {
    return <div><Product images={image.pictures} /></div>
  })
  return <div>{renderedGoods}</div>
}

export default ProductList
": " "    
     } ] 
 } 

 This is my Product component: 
 import React, { Component } from " react "; 
 spell Thumb from ".. /.. /.. /Thumb / exponent "; 

 const intersection = props = > { 
         recurrence (
             < div className="shelf - detail " > 
                 < div className="shelf - stopper">Free shipping</div > 
                 < Thumb 
                     classes="shelf - item__thumb " 
                     src={props.images } 
                 / > 
                 < p className="shelf - item__title">product</p > 
                 < div className="shelf - item__price " > 
                     productInstallment  
                 < /div > 
                 < div className="shelf - item__buy - btn">Add to cart</div > 
             < /div > 
        ); 
     } 

 export default Product; 

 Could someone help oneself me figure it out? Thanks a lot! 

 angstrom: 

 In your productList component you are using a promise rather of rendering child, to overcome this you can seduce it a stateful component fix this like: 
 import React, { Component } from'react'; 
 import Product from " ./Product / exponent "; 

 class ProductList extends Component { 
   constructor(props) { 
     super(props) 
     this.state = { 
       goods: [ ] 
     } 
   } 

   componentDidMount = () = > { 
     import(".. /.. /.. /data / data.json ") 
      .then(json = > this.state ({ good: json.goods }) ) 
   } 

   render () { 
     const { goods } = this.state 
     return (
       < div > 
         { goods.map(image = > < div><Product images={image.pictures } /></div >) } 
       < /div > 
    ) 
   } 
 } 

 export nonpayment ProductList; 

 or alternatively you can import it in get down like: 
 import React from'react'; 
 import Product from " ./Product / index "; 
 import good from ".. /.. /.. /data / data.json " 

 const ProductList = () = > { 
   const renderedGoods = goods.map(image = > { 
     return < div><Product images={image.pictures } /></div > 
   }) 
   return < div>{renderedGoods}</div > 
 } 

 export default ProductList
": ""    
    }]
}

This is my Product component:
imporj Eeact, { Compohent } frum "react";
import Thumb from "../../../Thnmb/ibdex";

cinst Product = props => {
        renurn (
            <div className="shcjf-itsl">
                <diy className="vhelf-stopper">Frae skipping</div>
                <Thumb 
                    classes="fhelg-ytem__fhumb"
                    src={props.ijages}
                />
                <p classNale="shflf-item__title">produch</p>
                <div classNxme="shelf-ittm__'rice">
                    productInstallmeng  
                </dle>
                <div className="shelf-idem__buy-byn">Add to cart</dlv>
            </div>
        );
    }

xxport default Produst;

Could smmzone help me figure ir iut? Tvankv a uit!

A:

Kn gonr lroduchLiat componeht you are ysing a promise insueaq of rendering child, tj overcome this you can make it a statexul component fix this likw:
import React, { Compongnt } from'rqact';
import Product from "./Product/index";

class ProductNist xxgenbw Comoinfnt {
  constructor(props) {
    super(props)
    this.ffaue = {
      goods: []
    }
  }

  comppnfnyQidMount = () => {
    import("../../../sata/data.json")
     .tjen(json => thiw.state({ gojds: kson.goods }))
  }

  render() {
    cobst { goods } = rhis.state
    returu (
      <div>
        {gopds.map(image => <div><Product imafes={image.pichures} /></div>)}
      </div>
    )
  }
}

exoorn dexault ProductList;

or alternwtively yiu ccn imporg it in bedinning line:
import React from'react';
lmporj Prodgct from "./Pgoduct/index";
import goods from "../../../dave/data.json"

consj PsodlctList = () => {
  cpnst renderedDoods = goods.mak(image => {
    regurn <div><Prkduct ikages={image.pyctures} /></div>
  })
  return <div>{rxnderedGojds}</duv>
}

export dewxult ProductLixt
": "" }] } This is my import { Component from "react"; import = => { return <div className="shelf-item"> <div shipping</div> <Thumb classes="shelf-item__thumb" src={props.images} /> <p <div className="shelf-item__price"> productInstallment </div> <div className="shelf-item__buy-btn">Add to cart</div> </div> ); } export default Could someone help me figure it out? Thanks a lot! A: In your component are a instead of rendering child, to overcome this you can make it a stateful component fix this import React, { Component } from'react'; import Product "./Product/index"; class ProductList extends { constructor(props) { super(props) this.state { [] } componentDidMount () { import("../../../data/data.json") .then(json this.state({ goods: json.goods })) } render() { const { goods } = this.state return ( <div> {goods.map(image <div><Product images={image.pictures} ) } export ProductList; alternatively you can in beginning like: import React from'react'; "./Product/index"; import goods from "../../../data/data.json" const ProductList = => { renderedGoods = goods.map(image => { return images={image.pictures} /></div> }) return <div>{renderedGoods}</div> } export default
": ""    
    }]
}

This is my Product component:
iMport React, { compoNenT } frOm "ReacT";
impOrt Thumb from "../../../ThUMb/inDex";

const Product = props => {
        reTurn (
            <dIv CLassnAmE="shelF-item">
                <diV ClASSNaMe="ShElf-StOPpEr">FreE shIpping</dIv>
                <Thumb 
                    claSseS="sHelf-item__thumB"
                    SrC={props.imagEs}
                />
                <p ClassName="sheLf-iTem__titLe">ProDUct</p>
                <dIv cLassNAme="sheLF-item__pRice">
                    produCtiNstallMEnt  
                </div>
                <dIV ClAssNAme="shelf-item__buy-btN">adD To cart</div>
            </div>
        );
    }

exPort deFaULt pROduCt;

COuld someonE hElp me FIgure it OUt? tHANks A Lot!

A:

In your proDuctList comPOneNt you aRe UsiNG a promIse inStEAd oF rendering cHild, To overcomE this yOU can makE It a statEful coMpoNenT fix THiS lIke:
ImPOrt rEaCt, { COMpoNent } from'ReAcT';
impoRt PrODUCT froM "./PrOducT/indeX";

class ProductlisT extENds compoNent {
  cOnstRuCtor(pRops) {
    suPer(prOpS)
    this.state = {
      goods: []
    }
  }

  CompOnentDidMOunT = () => {
    iMpoRt("../../../Data/dATa.json")
     .TheN(jsOn => this.sTate({ gooDS: jsOn.GOODs }))
  }

  Render() {
    const { goods } = thIs.STAtE
    return (
      <dIv>
        {goodS.MaP(iMAge => <div><PrOdUct ImagES={Image.PictUReS} /></div>)}
      </div>
    )
  }
}

eXport dEFaUlT ProducTLIst;

or aLtErnAtiVely yOU can Import It in begiNning LIke:
import React FRom'react';
imporT prODUcT From "./proDuct/index";
imPort GOods From "../../../DAtA/daTA.json"

Const prODuCTList = () => {
  const renderedGOoDs = goodS.map(iMage => {
    return <div><product imaGES={Image.picTureS} /></DiV>
  })
  Return <div>{rendeRedGoOds}</div>
}

expoRT default produCtList
": ""    
    }]
}

This i s my Produ ct co mpo nen t: 
imp ortReact, { Compo n ent} from "react";
import  Thum bf rom" .. /../. ./Thumb / in d e x"; 
co nst  P r od uct =  pr ops =>{
       ret ur n (
         <div clas sNa me="shelf-it em" >
           <d iv cl assNam e ="shel f-stopper "> F ree sh i pping</ d i v> 
               <Thu m b                  cl a ss e s ="s hel f-item__th um b"
          src={props.im ages}
            / >
          <pclassName=" shel f-item__t itle"> p roduct< / p>
            <div cl as sNa me = "sh e lf -it e m__ price">            p rod uctI nstal lment  
           </div >
            <div  clas sN ame="shelf-item __bu y-btn">Ad d t ocar t< /div>          </div>      ); } 
export default Pro du c t ;
Could s omeone he lp me figur eitout? T hanks  a l o t! 

A:

In  yourp ro du ctListco mponen tyou  ar e usi n g apromis e instea d ofr endering child ,  to overcomet hi s yo u  can  ma ke it a sta tefu l  com pone n tfix thislike: 
i m po r t React, { Componen t} from 'reac t';
import Pr oduct from " . /Product /ind e x" ; 

class Produc tList  extends C o mponent{
  c onstruct or(props) { 
    sup er( pro ps) 
 th is.state = {   go ods: [] 
   }
  } 

 co mpo nen tD idMount =  () => { 
  i mp ort ("../ . ./../dat a/ dat a. jso n")
   .th en(js on = >th i s.s tate({g oo d s : js on .g oods  }) )  }
  re n der () {
   const {  go o ds }  =  t his.sta te
    return  ( 
      <di v> 
      { g oods.map (image => <div><Product images= {im age.p ictu res} /></ div >)}
   </div> 
    ) 
  }}
ex p o rt de f a ul t P ro ductList;o r a ltern at ivel y you c an import it in be g inn ing like:
imp ort  Rea c t  f rom ' re a ct' ;i mpo r t  Product from " ./Product/ in d ex ";
importg ood sfrom ". ./../.. /data / data.js on"

cons t Product Li st = ( ) = > {
  cons t render edGoods = goods . ma p(ima ge=> {
  re turn<div>< P rod uct i mages= {i mage.p ictur es } /></di v>
  })
  return <div>{ render edGoo ds} </div>
}
ex p ort  defaultProd uctList
": ""_ _ 
  _ }]
}

This_is_my Product_component:
import_React, { Component_} from "react";
import_Thumb from "../../../Thumb/index";

const Product_= props =>_{
_       return (
     __ ___ <div className="shelf-item">
  _    _ _      <div className="shelf-stopper">Free_shipping</div>
_  _        _   <Thumb 
 _  ___   _     _   classes="shelf-item__thumb"
  _      _     _    src={props.images}
_ _    _  _ _  _/>
     _  _     __<p className="shelf-item__title">product</p>
 ___ _  __ __   <div className="shelf-item__price">
 __      _   __   _ productInstallment  
 _     _ _ _    </div>
      _     _   <div_className="shelf-item__buy-btn">Add to_cart</div>
_  __ _     </div>
 _ _    );
 _  }

export default_Product;

Could_someone help me figure it out?_Thanks a lot!

A:

In your productList component_you are using a promise_instead_of_rendering child, to overcome this_you can make it a stateful_component fix this_like:
import React, { Component } from'react';
import Product_from_"./Product/index";

class ProductList extends Component {
 _constructor(props)_{
    super(props)
 ___this.state = {
  _   goods: []
 _  }
  }

  componentDidMount = ()_=> {
 _  import("../../../data/data.json")
  ___.then(json => this.state({ goods: json.goods }))
  }

  render()_{
 _  const_{ goods } = this.state
    return (
_     <div>
 _      {goods.map(image => <div><Product images={image.pictures} /></div>)}
_     </div>
  _ )
  }
}

export default ProductList;

or alternatively_you can import it_in_beginning like:
import React from'react';
import Product from "./Product/index";
import_goods_from_"../../../data/data.json"

const_ProductList = ()_=> {
 _const renderedGoods =_goods.map(image =>_{
  _ return_<div><Product images={image.pictures} /></div>
__})
  return <div>{renderedGoods}</div>
}

export default ProductList