-
Notifications
You must be signed in to change notification settings - Fork 102
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
Cannot read property 'scale' of undefined #23
Comments
I tested and now I understand the bug. const DEFAULT_STATE: any = { |
When I replace the 'images' through reducer the ImageView still shows me the default image. ImageView images={[this.props.item]} Which means that changing 'images' doesn't work. The component retains the first 'images' given. |
The problem is that you take the 'images' from state instead of props. Instead of: you need to do this: |
Thanks for issue, let me investigate it. The problem is that in this version there are a lot of logic happens when component receive new images. I think you right and maybe it is not necessary to store images in state, but I need some free time to test it all. Or you can send PR :) |
Sorry, don't have the time. |
Any progress with this issue? It seems the takes first image passed to it even when the whole page re-renders. Is there a way to dynamically change the set of images passed to it? |
If you want to fix it yourself, you just need to take the images in render() from props instead of state. |
When I load images after rendering I get "Cannot read property 'scale' of undefined".
The text was updated successfully, but these errors were encountered: