redux-responsive
redux-responsive copied to clipboard
How to properly handle non-numerical media queries
Our current implementation gives browser.lessThan.landscape a false value which is not quite right. Maybe this is a good usecase for setting the value to undefined?
For the project I'm currently working on, we've leaned heavily on leaving items undefined where possible (though Redux gets in the way of that somewhat) because (a) we're using react-redux and supplying everything as destructured props, and (b) we're using Typescript/ES6, so it's extremely easy to have inline defaults inside a component for undefined items from the Redux state (but not for null ones).
However, the "official" approach for Redux seems to be to set things null and never use undefined, to the point of it refusing to accept undefined values from normal reducers.