developerdizzle / react-virtual-list

Super simple virtualized list React component
http://developerdizzle.github.io/react-virtual-list/
MIT License
619 stars 73 forks source link

mobx observable and checking items against PropTypes.array #69

Closed cotko closed 6 years ago

cotko commented 6 years ago

Hi,

you specified that items should be an array but since this is a mobx related module, it would probably make sense that observable lists can be passed as items as well (I'm currently getting error notices because of this)?

static propTypes = {
      items: PropTypes.oneOfType([
          PropTypes.array,
          PropTypes.object
      ]).isRequired,
      itemHeight: PropTypes.number.isRequired,
      itemBuffer: PropTypes.number,
};

https://mobx.js.org/best/pitfalls.html

cotko commented 6 years ago

closing because of https://github.com/developerdizzle/react-virtual-list/issues/45