digidem / react-dimensions

[Looking for maintainers]

Home Page:http://lab.digital-democracy.org/react-dimensions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IE9 compatibility

oliviertassinari opened this issue · comments

This module is using the console API: https://github.com/digidem/react-dimensions/blob/master/index.jsx#L162.
Notice that this API isn't available in IE9. Besides, I don't think that throwing a warning in production has much value.

We could be using https://www.npmjs.com/package/warning with https://www.npmjs.com/package/babel-plugin-transform-dev-warning to remove those check in production.

Did now know that about IE9. Agreed.

The console.warnings are also annoying when this is being rendered server side; it's generating noise in the logs for expected behaviour (height and width are not expected to be present on the server).

@gmaclennan Whats the status of this? Warnings definitely shouldn't be ran in NODE_ENV=production

@sontek Here is my workaround if that can help.

Happy to accept a PR, I'm not really using this any more since for grids/tables in React I've switched from fixed-data-table (which I was using this for) to react-virtualized which includes similar functionality to this with the Autosizer