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

Height is always null #79

Closed bradennapier closed 7 years ago

bradennapier commented 7 years ago

Can not get this measure height

Object {width: 929, height: null}
const SizeQuery = size => {
  console.log(size)
  return size
}

export default componentQueries({
  queries: [
    SizeQuery,
  ],
  configure: {
    monitorWidth:  true,
    monitorHeight: true,
    refreshRate:   16
  }
})(MapHandler)
bradennapier commented 7 years ago

Ok fixed this by adding height 100% -- duh :-P hadn't realized it wasnt expanding like it should..