道具验证中缺少道具

Nic*_*icc 5 javascript reactjs

我正在使用由linter eslint-plugin-react解析的以下代码。它返回警告:

“道具验证中缺少产品”

当我在底部的propTypes中声明product时,我将其传递给函数。任何的想法 ?

import React from 'react'

const ProductDesc = (props)=>({
  render(){
    return (
      <div>
        <h1>{props.product.headline}</h1>
        <img src={props.product.images[0].imagesUrls.entry[2].url} alt="Thumbnail large pic"/>
        <p>Yeah</p>
      </div>
    )
  }
})

ProductDesc.propTypes = {
  product: React.PropTypes.object
};

export default ProductDesc;
Run Code Online (Sandbox Code Playgroud)