Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobx observable and checking items against PropTypes.array #69

Closed
cotko opened this issue Dec 12, 2017 · 1 comment
Closed

mobx observable and checking items against PropTypes.array #69

cotko opened this issue Dec 12, 2017 · 1 comment

Comments

@cotko
Copy link

cotko commented Dec 12, 2017

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
Copy link
Author

cotko commented Dec 12, 2017

closing because of #45

@cotko cotko closed this as completed Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant