Skip to content

Commit 50c0631

Browse files
Fix ImageProps default values
Summary: Changelog: [Internal] Currently these default values https://reactnative.dev/docs/image#resizemethod-android https://reactnative.dev/docs/image#resizemultiplier-android are not correctly treated in C++ code as parsing bails out here: https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/core/propsConversions.h#L176-L177 By setting default values in the struct, we can fix it Differential Revision: D87083023
1 parent e08abbc commit 50c0631

File tree

1 file changed

+2
-2
lines changed
  • packages/react-native/ReactCommon/react/renderer/components/image

1 file changed

+2
-2
lines changed

packages/react-native/ReactCommon/react/renderer/components/image/ImageProps.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class ImageProps final : public ViewProps {
3333
EdgeInsets capInsets{};
3434
SharedColor tintColor{};
3535
std::string internal_analyticTag{};
36-
std::string resizeMethod{};
37-
Float resizeMultiplier{};
36+
std::string resizeMethod{"auto"};
37+
Float resizeMultiplier{1.f};
3838
bool shouldNotifyLoadEvents{};
3939
SharedColor overlayColor{};
4040
Float fadeDuration{};

0 commit comments

Comments
 (0)