Updating the documentation for getSize()

Summary:
Clearly state that the `getSize()` does not work for static image resources because it is assumed the developer knows their static image resource size (the reason I got from a comment on a github issue by a react native contributor).

This missing documentation cost me about 30 minutes to figure out why it didn't work for my static image resource and so I decided to update the documentation 💃
Closes https://github.com/facebook/react-native/pull/11645

Differential Revision: D4533463

Pulled By: lacker

fbshipit-source-id: 70e175ea30a5540c8a9f2a0c040585c711d82ac3
This commit is contained in:
Mohammed 2017-03-08 06:41:17 -08:00 committed by Facebook Github Bot
parent abc483a653
commit 0150bc76eb
1 changed files with 2 additions and 0 deletions

View File

@ -289,6 +289,8 @@ const Image = React.createClass({
* does not fully load/download the image data. A proper, supported way to
* preload images will be provided as a separate API.
*
* Does not work for static image resources.
*
* @param uri The location of the image.
* @param success The function that will be called if the image was successfully found and width
* and height retrieved.