es6-set-proptypes
v1.0.0
Published
React PropTypes for ES6 Sets and compatible interfaces
Downloads
654
Maintainers
Readme
es6-set-proptypes
React PropTypes for ES6 Sets and compatible interfaces.
Tested with native Set (in Node), babel-polyfill, es6-set, and Immutable.Set. Includes an isRequired
property to work the same way as React.PropTypes.
Usage
import React, { Component, PropTypes } from 'react';
import setType from 'es6-set-proptypes';
export default class UniqueList extends Component {
static propTypes = {
header: PropTypes.string,
items: setType.isRequired,
hiddenItems: setType
};
render() {
return (
...
);
}
}