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

CellMeasurer propTypes shouldn't expect instance of CellMeasurerCache #1026

Closed
kof opened this issue Feb 27, 2018 · 2 comments
Closed

CellMeasurer propTypes shouldn't expect instance of CellMeasurerCache #1026

kof opened this issue Feb 27, 2018 · 2 comments

Comments

@kof
Copy link

kof commented Feb 27, 2018

Currently CellMeasurer explicitly checks the type of cache prop to be CellMeasurerCache. If it is expected that user is able to implement his own Cache class, then one shouldn't validate that way, instead it should be checking for specific methods to be implemented.

@kof
Copy link
Author

kof commented Feb 27, 2018

I worked this around temporarily by extending CellMeasurerCache but seems unnecessarily.

@diogofcunha
Copy link
Contributor

We should create an interface with the public api and type check based on that, nice catch.
Will do that tomorrow

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

2 participants