import React from 'react';

export default function pendingComponent(hasLoadedTest, ReadyComponent, NotReadyComponent) {
  return (props) => {
    if (hasLoadedTest(props)) {
      return <ReadyComponent { ...props } />;
    }
    else {
      return <NotReadyComponent />;
    }
  }
}

import React from 'react';

export default function pending(NotReadyComponent) {
  return (hasLoadedTest, ReadyComponent) => (props) => {
    if (hasLoadedTest(props)) {
      return <ReadyComponent { ...props } />;
    }
    else {
      return <NotReadyComponent />;
    }
  }
}

Make pending function curried, to be set up with NotReadyComponent
Make pending function curried, to be set up with NotReadyComponent
