Files
react-native/ReactCommon/react
Nikita Lutsenko 70788313fe react-native | Fix a crash on deserilization of props when using 'px'/'em' units.
Summary:
A huge set of props use YGValue directly, say something really basic like `margin`/`position`/`padding`/`border`.
All of these according to CSS spec actually support `number | "em" | "px" | %` units, but we are going to throw and hard crash on `em` and `px`, which are unsupported in React Native.

Using `tryTo` instead of `to` (noexcept vs throwing method) for conversion, and treating things like `margin: 50px` same way as we would treat `margin: false` which is not really supported.

Changelog:
    [General][Fixed] - Fixed a crash on deserialization of props when using 'px'/'em' units.

Reviewed By: bvanderhoof

Differential Revision: D37163250

fbshipit-source-id: 59cbe65a821052f6c7e9588b6d4a0ac14e344684
2022-06-15 00:12:58 -07:00
..
2022-06-08 21:15:53 -07:00
2022-04-05 12:15:05 -07:00