diff --git a/docs/image.html b/docs/image.html index 44d953e02b9..407f21a8327 100644 --- a/docs/image.html +++ b/docs/image.html @@ -31,7 +31,7 @@ testing scripts.

// GOOD var icon = this.props.active ? require('image!my-icon-active') : require('image!my-icon-inactive'); -<Image source={icon} />

When your entire codebase respects this convention, you're able to do interesting things like automatically packaging the assets that are being used in your app. Note that in the current form, nothing is enforced, but it will be in the future.

Adding Static Resources to your App using Images.xcassets #

NOTE: App build required for new resources

Any time you add a new resource to Images.xcassets you will need to re-build your app through XCode before you can use it - a reload from within the simulator is not enough.

This process is currently being improved, a much better workflow will be +<Image source={icon} />

When your entire codebase respects this convention, you're able to do interesting things like automatically packaging the assets that are being used in your app. Note that in the current form, nothing is enforced, but it will be in the future.

Adding Static Resources to your App using Images.xcassets #

NOTE: App build required for new resources

Any time you add a new resource to Images.xcassets you will need to re-build your app through Xcode before you can use it - a reload from within the simulator is not enough.

This process is currently being improved, a much better workflow will be available shortly.

Network Resources #

Many of the images you will display in your app will not be available at compile time, or you will want to load some dynamically to keep the binary size down. Unlike with static resources, you will need to manually specify the dimensions of your image.

// GOOD <Image source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} style={{width: 400, height: 400}} />