ctrlplusb / react-component-queries

Provide props to your React Components based on their Width and/or Height.
MIT License
183 stars 12 forks source link

Always pass size to component #80

Open bradennapier opened 7 years ago

bradennapier commented 7 years ago

Hey!
Love the this - great tool thanks as always -- pretty sure I use more of your packages than anyones. :)

Anyway, so the issue I have is that if you return height/width with the query then you will always update - losing the benefit of this component completely. However, when it does render I still need the measured height/width to operate styles etc based upon it. I think in that sense we should always get the height/width props sent down -- or perhaps at least allow us to request this action via a configuration prop?

bradennapier commented 7 years ago

Pull Request created! https://github.com/ctrlplusb/react-component-queries/pull/81