Failed prop type: Invalid prop `responsive` of type `string` supplied to `Image`, expected `boolean`

Max Silva

Line in question:

<Poster 
  info="info" 
  id={movie.id} 
  path={movie.poster_path} 
  title={movie.title} 
  popularity={movie.popularity} 
  genres={genres} 
  responsive="responsive"
/>

Should be really simple i just cant work out how to change responsive="responsive" into the right boolean what is it expecting?

Thanks

Shubham Khatri

The component Poster expects responsive prop to be a boolean and not a string. A boolean true value can simply be passed like

<Poster 
    info="info"
    id={movie.id}
    path={movie.poster_path}
    title={movie.title} popularity={movie.popularity}
    genres={genres}
    responsive
/>

or

    <Poster 
    info="info"
    id={movie.id}
    path={movie.poster_path}
    title={movie.title} popularity={movie.popularity}
    genres={genres}
    responsive={true}
/>

and a false value can be given like

<Poster 
    info="info"
    id={movie.id}
    path={movie.poster_path}
    title={movie.title} popularity={movie.popularity}
    genres={genres}
    responsive={false}
/>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Warning: Failed prop type: Invalid prop `open` of type `function` supplied to `ForwardRef(Dialog)`, expected `boolean`. at Dialog

Failed prop type: Invalid prop `match.params` of type `object` supplied to `Page`, expected `string`

Warning: Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput`, expected `string`

Warning: Failed prop type: Invalid prop `defaultValue` of type `string` supplied to `AutoCompleteSearch`, expected `function`

Failed prop type: Invalid prop `children` of type `string` supplied to `DetailField`, expected `object`

GraphQL: Warning: Failed prop type: Invalid prop `query` of type `object` supplied to `StaticQuery`, expected `string`

Warning: Failed prop type: Invalid prop `items[0]` of type `string` supplied to `ImageGallery`, expected `object`

Failed prop type: Invalid prop `answer` of type `string` supplied to `AnswerItem`, expected `object`

Warning: Failed prop type: Invalid prop 'source' supplied to 'Image'

Failed prop type: Invalid prop `to` supplied to `Redirect`

Invalid prop: type check failed for prop "value". Expected Boolean, got String with value "0"

Warning: Failed prop type: Invalid prop `data` of type `object` supplied to `Carousel`, expected `array`

Failed prop type: Invalid prop `onClick` of type `object` supplied to `ButtonBase`, expected `function`

Failed prop type: Invalid prop of type `function` supplied expected a single ReactElement

Failed prop type: Invalid prop `onClick` of type `object` supplied to `Button`, expected `function`

Why do I get Failed prop type: Invalid prop `onAnimationFinish` of type `object` supplied to `LottieView`, expected a `funtion`

Failed prop type: Invalid prop `component` of type `object` supplied to `Route`, expected `function`

Invalid prop type supplied

Failed prop type: Invalid prop `children` of type `array` supplied to `GlobalState`

Failed prop type: Invalid prop `opacity` of type `object` supplied to `RCTView`

React Warning: Failed prop type: Invalid prop of type `Object` supplied

Failed prop type: Invalid prop `app` supplied to `Body`, expected a single ReactElement

GETTING ERROR : Warning: Failed prop type: Invalid prop `children` supplied to `Form`, expected a ReactNode

Failed prop type: Invalid prop `children` supplied to `ForwardRef(Select)`, expected a ReactNode

React router error (Failed prop type: Invalid prop `children` supplied to `Switch`, expected a ReactNode.)

Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Select)`, expected a ReactNode

React Snapshot testing with jest - Failed prop type: Invalid prop `children` of type `string` supplied

Warning: Failed prop type: Invalid prop `source` supplied to `Image`. I have saved path of the image with require() in an object

Failed prop type: Invalid prop `lg` supplied to `ForwardRef(Grid)`