paulcollett / react-masonry-css

React Masonry layout component powered by CSS, dependancy free
https://paulcollett.github.io/react-masonry-css/demo/
MIT License
962 stars 66 forks source link

Updated to React 16, and some other changes. #9

Closed balazsorban44 closed 7 years ago

balazsorban44 commented 7 years ago

I was thinking maybe you should not require the user to use CSS, but rather pass all the necessary information as props. I added some changes for that. I also upgraded to React 16, and updated the README file where it was needed. :)

paulcollett commented 7 years ago

Love the changes. Having default styling makes this so much simpler to implement, which is nice! I would say that if the dev wanted we should continue to allow for classNames instead of styles - maybe a disable prop or detection of the missing className prop.

This also leads onto how we can implement this without breaking the current default behaviour. If we want to change the default then we'll need to document breaking changes and treat this as a separate new major version. I think we'll be able to introduce this feature without needing any breaking changes?

Also, does the bump to react 16 still generate react 15 compatible component files?

Thanks for the feature add @balazsorban44

balazsorban44 commented 7 years ago

I don't think that it will break anything, as I just moved a few stylings from the CSS to inline styling. The worst that could happen is that the users have redundant CSS left in their .css files. Unfortunately, I did not manage to run the build command without an error, because PropTypes are working differently in React 16 now. It would be nice if you could check that. Here is a link with more info: https://reactjs.org/blog/2017/09/26/react-v16.0.html#packaging I am thinking if this pull request should be moved to a branch then, to not to mess up the master branch. Could you make me a contributor, or add a new branch?

paulcollett commented 7 years ago

Yeah React 16 is definitely something we should support, I'll create a separate issue for this. I'm not to familiar with github repo roles, but I'll see what I can get ya for these features

paulcollett commented 7 years ago

You should be invited as a contributor, which will hopefully gives you access to create new branches. Let me know if thats not the case