dantrain / react-stonecutter

Animated grid layout component for React
http://dantrain.github.io/react-stonecutter
MIT License
1.21k stars 72 forks source link

React does not recognize the `itemHeight` prop on a DOM element #45

Open zanedev opened 5 years ago

zanedev commented 5 years ago

Hi when adding itemHeight to an li to a css grid like the example I get the message React does not recognize theitemHeightprop on a DOM element. When I remove the prop I get a warning Uncaught Error: Each child must have an "itemHeight" prop or an "itemRect.height" prop. How can I work around this?

loganmay commented 5 years ago

Can you post a code snippet?

zanedev commented 5 years ago

This is a standard warning with react-16.9.0 it doesn't allow custom props on an html element.

<li key={key} itemHeight={image.images.low_resolution.height}>
  <img src={image.images.low_resolution.url} />
</li>