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

CachedImage with resizeMode style cause warning #51

Closed
wonday opened this issue Jun 21, 2017 · 1 comment
Closed

CachedImage with resizeMode style cause warning #51

wonday opened this issue Jun 21, 2017 · 1 comment

Comments

@wonday
Copy link

wonday commented Jun 21, 2017

Hi kfiroo,

If I add resizeMode to CachedImage style, it will cause warning

<CachedImage style={{resizeMode:Image.resizeMode.stretch}} source={{uri:item.img}} />
Warning: Failed prop type: Invalid props.style key `resizeMode` supplied to `ActivityIndicator`.
Bad object: {
  "width": 360,
  "height": 592,
  "resizeMode": "stretch",
  "opacity": 0,
  "backgroundColor": "transparent",
  "alignItems": "center",
  "justifyContent": "center"
}
...
    in ActivityIndicator (created by CachedImage)
    in CachedImage (created by TopBannerItem)

Warning: Failed prop type: Invalid props.style key `resizeMode` supplied to `View`.
Bad object: {
  "alignItems": "center",
  "justifyContent": "center",
  "width": 360,
  "height": 592,
  "resizeMode": "stretch",
  "opacity": 0,
  "backgroundColor": "transparent"
}
...
    in View (created by ActivityIndicator)
    in ActivityIndicator (created by CachedImage)
    in CachedImage (created by TopBannerItem)
@wonday
Copy link
Author

wonday commented Jun 22, 2017

the same with #45 and #1

should not use resizeMode in style,
should use props resizeMode instead

@wonday wonday closed this as completed Jun 22, 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