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

Receive warning when using resizeMode in style #1

Closed
fgeorgsson opened this issue Jan 27, 2017 · 1 comment
Closed

Receive warning when using resizeMode in style #1

fgeorgsson opened this issue Jan 27, 2017 · 1 comment

Comments

@fgeorgsson
Copy link

Whenever I use resizeMode in style I get a React warning:
Warning: Failed prop type: Invalid props.style key 'resizeMode' supplied to 'ActivityIndicator'.

It seems as if the style given to CachedImage is used on both the ActivityIndicator and the Image elements. Is there a way to get the separate styles to them?

<CachedImage
  useQueryParamsInCacheKey
  style={{ resizeMode: 'contain' }}
  source={uri}
/>
@kfiroo
Copy link
Owner

kfiroo commented Jan 29, 2017

@PCguru Hey, Thanks for this.
The goal was to avoid having to declare the style twice and that the ActivityIndicator would fit in the image's place seamlessly.

Maybe you could use the 'resizeMode' prop instead of the style? see docs

kfiroo pushed a commit that referenced this issue Jun 5, 2017
tsemerad pushed a commit to alseageo/react-native-cached-image that referenced this issue Dec 17, 2018
Complete update to moving from react-native-fetch-blob to rn-fetch-blob
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