Missing requisites from requisites check

I use the following code, which is parsed using linter eslint-plugin-responsive. It returns a warning:

"missing in the verification of details"

while I declare the product in propTypes below and pass it to the function. any idea?

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;
+4
source share
1 answer
Syntax

should have been

const ProductDesc = (props)=>{
    return (
      <div>
        <h1>{props.product.headline}</h1>
        <p>Yeah</p>
      </div>
    )
}
+1
source

Source: https://habr.com/ru/post/1652075/


All Articles