function renderWhileEmpty(propNames, component) {
  if (!propNames || !Array.isArray(propNames)) {
    const missingPropNamesErrMsg = 'renderWhileEmpty requires propNames array'
    console.error(missingPropNamesErrMsg) // eslint-disable-line no-console
    throw new Error(missingPropNamesErrMsg)
  }
  return renderWhile(
    // Any of the listed prop name correspond to empty props (supporting dot path names)
    props =>
      propNames.some(propNames, name => {
        const propValue = get(props, name)
        return (
          isLoaded(propValue) &&
          (isEmpty(propValue) ||
            (Array.isArray(propValue) && !Object.keys(propValue).length))
        )
      }),
    component
  )
}
HOC that shows a component while any of a list of props loaded from Firebase
is empty (uses react-redux-firebase's isEmpty).
@param {Array} propNames - List of prop names to check loading for
@param {React.Component} component - React component to render if prop loaded
from Firebase is empty
@returns {HigherOrderComponent}
@example
renderWhileEmpty(['todos'], () => <div>Todos Not Found</div>),