react-collection-helpers
Version:
React Collection Helpers Component
22 lines (16 loc) • 716 B
JavaScript
import React, { PropTypes } from 'react';
import { DISPLAY_NAME_PREFIX } from '../../constants';
import BaseCollectionHelper from '../BaseCollectionHelper';
// So, this component is a little ridiculous. Our BaseCollectionHelper has
// a built-in map, so we really just need to delegate to this.
// Choosing to make it its own component rather than just an alias for
// consistency with other collection helpers, for predictability when
// debugging.
var Map = function Map(props) {
return React.createElement(BaseCollectionHelper, props);
};
Map.displayName = DISPLAY_NAME_PREFIX + 'Map';
process.env.NODE_ENV !== "production" ? Map.propTypes = {
collection: PropTypes.array
} : void 0;
export default Map;