-
Notifications
You must be signed in to change notification settings - Fork 0
Container Props
Michael Niday edited this page Jun 5, 2018
·
1 revision
Containers provided by the entities HOC have the following properties:
const containerPropTypes = {
/** Initialize the container state. */
errors: PropTypes.oneOfType([
ImmutablePropTypes.list,
ImmutablePropTypes.map
]),
/** Given a set of params, fetch all of the entities. */
fetchAll: PropTypes.func,
/** Current filters. */
filters: ImmutablePropTypes.map,
/** Initialize the container state. */
initialize: PropTypes.func,
/** Whether or not there has been an initial fetch. */
isFetched: PropTypes.bool,
/** Whether or not there's an action taking place. */
isLoading: PropTypes.bool,
/** Item referenced by the given ID. If multiple IDs, it's the first item. */
item: ImmutablePropTypes.record,
/** List of items referenced by the given ID(s). */
items: ImmutablePropTypes.list,
/** Set of ids that were requested but not available in the store. */
missingIds: ImmutablePropTypes.set,
/** Perform an API action against this resource. */
performAction: PropTypes.func,
/** Total entities in a given collection. */
total: PropTypes.number,
/** Type of the collecton associated with resource config */
type: PropTypes.string,
/** Update the filters for this container. */
updateFilters: PropTypes.func,
/** Resets the state of this container */
resetContainer: PropTypes.func
}