I'm trying to integrate masonry.js in react.js and I'm having design problem.
Should I have all masonry blocks in one root react component like how it's done in react-masonry-component
<RootComponent>
this.props.elements.map(function(element){
return (
<li className="image-element-class">
<img src={element.src} />
</li>
);
});
<RootComponent>
Or should I have each masonry block as a new React component as child components of a root react component ?
<RootComponent>
this.props.elements.map(function(element){
return (
<ChildComponent props={element}>
);
});
<RootComponent>