wadackel / react-stack-grid

Pinterest like layout components for React.js
https://wadackel.github.io/react-stack-grid/
MIT License
870 stars 77 forks source link

More "how to use it" examples ? #50

Open JulienDesmettre opened 6 years ago

JulienDesmettre commented 6 years ago

Hello, thanks a lot for these components. Your live demo is really nice. It's not an issue, more an understanding problem by my side, as i'm a newbie with React, but seeing more complete component code and how you use different properties and how you control your grid will be really helpfull. Or at least seeing how your live demo is made, especially the "real world" example. I'm trying to understand it through react developper tool, but i'm not recognizing the code structure.

nick-gaudreau commented 6 years ago

I agree. Could you share the react code for the "real world" example

NevenLeung commented 6 years ago

Hi @JulienDesmettre @JulienDesmettre , here is the code of real world example.

Some props may be not necessary. Here is the my minimal usage:

<StackGrid
  columnWidth={210}
  monitorImagesLoaded={true}
>
  {PhotoItems}  // PhotoItems is an array of <img> component
</StackGrid>

If you have any other requirement, check the usage of the props properties in README.md.