The react-sizeme HOC accepts the noPlaceholder configuration which sends the sizing props through as null on first render rather than rendering a placeholder component. Since the use-case for react-component-queries is to deal with raw size values inside the query and pass a computed prop to the actual component, it makes sense to allow noPlaceholder in the config for componentQueries and the user can then perform the null case checking inside queries
The react-sizeme HOC accepts the
noPlaceholder
configuration which sends the sizing props through asnull
on first render rather than rendering a placeholder component. Since the use-case for react-component-queries is to deal with raw size values inside the query and pass a computed prop to the actual component, it makes sense to allownoPlaceholder
in theconfig
forcomponentQueries
and the user can then perform the null case checking insidequeries
Example usage would be:
If this seems like a valid addition, I can get a PR going :)