[docs] Remove old image! examples from docs
This commit is contained in:
parent
7779e06a7f
commit
7b2cd03d6a
|
@ -99,12 +99,12 @@ iOS saves multiple sizes for the same image in your Camera Roll, it is very impo
|
|||
|
||||
*In the browser* if you don't give a size to an image, the browser is going to render a 0x0 element, download the image, and then render the image based with the correct size. The big issue with this behavior is that your UI is going to jump all around as images load, this makes for a very bad user experience.
|
||||
|
||||
*In React Native* this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or aspect ratio) of the remote image in advance, but we believe that it leads to a better user experience. Static images loaded from the app bundle via the `require('image!x')` syntax *can be automatically sized* because their dimensions are available immediately at the time of mounting.
|
||||
*In React Native* this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or aspect ratio) of the remote image in advance, but we believe that it leads to a better user experience. Static images loaded from the app bundle via the `require('./my-icon.png')` syntax *can be automatically sized* because their dimensions are available immediately at the time of mounting.
|
||||
|
||||
For example, the result of `require('image!logo')` from the above screenshot:
|
||||
For example, the result of `require('./my-icon.png')` from the above screenshot:
|
||||
|
||||
```javascript
|
||||
{"__packager_asset":true,"isStatic":true,"path":"/Users/react/HelloWorld/iOS/Images.xcassets/react.imageset/logo.png","uri":"logo","width":591,"height":573}
|
||||
{"__packager_asset":true,"path":"/Users/react/HelloWorld/my-icon.png","uri":"my-icon.png","width":591,"height":573}
|
||||
```
|
||||
|
||||
## Source as an object
|
||||
|
|
Loading…
Reference in New Issue