mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update Image.d.ts (#39230)
Summary:
I've seen that this throws a warning:
```
<ImageBackground source={{ uri: undefined }}>
```
But this is properly working, without a warning, thus, I believe the code is allowing it:
```
<ImageBackground source={isLoading ? undefined : { uri: 'https://....' }}>
```
## Changelog:
[GENERAL] [CHANGED] - Fixed `source` in `Image` type
Pull Request resolved: https://github.com/facebook/react-native/pull/39230
Test Plan: Not necessary. It's just a DOC change
Reviewed By: rshest
Differential Revision: D48939824
Pulled By: NickGerleman
fbshipit-source-id: fca2e07b7b4d4b947e365bb9d82fcf4cea484951
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4dea63530f
commit
83885f1d69
+1
-1
@@ -223,7 +223,7 @@ export interface ImagePropsBase
|
||||
*
|
||||
* The currently supported formats are png, jpg, jpeg, bmp, gif, webp (Android only), psd (iOS only).
|
||||
*/
|
||||
source: ImageSourcePropType;
|
||||
source?: ImageSourcePropType | undefined;
|
||||
|
||||
/**
|
||||
* A string representing the resource identifier for the image. Similar to
|
||||
|
||||
Reference in New Issue
Block a user