1.2.0 • Published 6 years ago

common-data v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Common Data

HoCs

withLoading (isLoading: (props) => bool, LoadingComponent: ReactComponent): (WrappedComponent) => EnhancedComponent
withPlaceholder (isEmpty: (props) => bool, PlaceholderComponent: ReactComponent): (WrappedComponent) => EnhancedComponen

//  Injected Props
{
  injected props:
  initialLoading: bool,
  activelyRefetching: bool,
  passivelyRefetching: bool,
  fetchingMore: bool
}
withApolloData: (WrappedComponent) => EnhancedComponent
enhancedGraphql(query: ApolloQuery, config: ApolloConfig, { LoadingComponent: ReactComponent, PlaceholderComponent: ReactComponent, ErrorComponent:ReactComponent }): (WrappedComponent) => EnhancedComponent