react-native-macos/ReactCommon
David Aurelio 110a382b59 Expose the value type used by `YGStyle` as `ValueRepr`
Summary:
@public

Adds `YGStyle::ValueRepr` to make code depending on the actual type easier to write.

So far, we have treated `yoga::detail::CompactValue` as an implementation detail, and that’s what it’s supposed to stay.

React Native Fabric has one value conversion overload that depends on that type, though, and used `decltype(YGStyle{}.margin()[0])` until now.
That’s problematic for two reasons:

- we want to constrain the parameter of `operator[](...)` to enum types, making the `0` unsuitable
- we want to return the non-const overload of the operator to return a custom `Ref` type, which is not the type needed by Fabric.

Making the storage type explicit allows to write more forward-compatible code.

Reviewed By: SidharthGuglani

Differential Revision: D15078960

fbshipit-source-id: 932c27ef2f2cdc6ce965b79894268170f0ccdce5
2019-04-29 09:22:31 -07:00
..
better Fabric: Disabling custom ("better") containers in DEBUG mode 2019-03-20 09:24:59 -07:00
config xplat// -> fbsource//xplat/ for xplat/js 2019-02-14 23:53:32 -08:00
cxxreact Make isInspectable safe to call from any thread 2019-04-17 21:23:19 -07:00
fabric Expose the value type used by `YGStyle` as `ValueRepr` 2019-04-29 09:22:31 -07:00
jsi Report native module name on crash when native module has failed to load (#24633) 2019-04-29 03:36:17 -07:00
jsiexecutor TM iOS: force flush message queue when calling into JS from native 2019-03-29 01:39:39 -07:00
jsinspector Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
microprofiler Upgrade mobile BUCK and .bzl files to use C++14 2019-03-16 02:25:33 -07:00
turbomodule Fix ObjCTurboModule::getArgumentTypeName 2019-04-23 17:52:21 -07:00
utils Fabric: DEBUG-only check for type match in ContextContainer 2019-04-22 08:36:08 -07:00
yoga Expose the value type used by `YGStyle` as `ValueRepr` 2019-04-29 09:22:31 -07:00
React-Fabric.podspec Update rncore podspec to exclude codegen test files (#24513) 2019-04-18 09:30:51 -07:00