diff --git a/change/react-native-windows-2019-10-23-17-22-31-user-adamgor-fixStartAnimate.json b/change/react-native-windows-2019-10-23-17-22-31-user-adamgor-fixStartAnimate.json new file mode 100644 index 00000000000..909d06f4f42 --- /dev/null +++ b/change/react-native-windows-2019-10-23-17-22-31-user-adamgor-fixStartAnimate.json @@ -0,0 +1,9 @@ +{ + "type": "prerelease", + "comment": "Register 2x NYI stubs for NativeAnimatedModule", + "packageName": "react-native-windows", + "email": "adamgor@microsoft.com", + "commit": "7fe94c3453054779d8004da83f3e7efd1c433caa", + "date": "2019-10-24T00:22:31.233Z", + "file": "F:\\GS\\repo\\RNW\\change\\react-native-windows-2019-10-23-17-22-31-user-adamgor-fixStartAnimate.json" +} \ No newline at end of file diff --git a/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp b/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp index 794f0cf34e9..b445eb20e55 100644 --- a/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp +++ b/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp @@ -27,6 +27,8 @@ const char *NativeAnimatedModule::s_flattenAnimatedNodeOffsetName{"flattenAnimat const char *NativeAnimatedModule::s_extractAnimatedNodeOffsetName{"extractAnimatedNodeOffset"}; const char *NativeAnimatedModule::s_addAnimatedEventToViewName{"addAnimatedEventToView"}; const char *NativeAnimatedModule::s_removeAnimatedEventFromViewName{"removeAnimatedEventFromView"}; +const char *NativeAnimatedModule::s_startListeningToAnimatedNodeValueName{"startListeningToAnimatedNodeValue"}; +const char *NativeAnimatedModule::s_stopListeningToAnimatedNodeValueName{"stopListeningToAnimatedNodeValue"}; NativeAnimatedModule::NativeAnimatedModule(const std::weak_ptr &reactInstance) : m_wkReactInstance(reactInstance) { @@ -132,6 +134,18 @@ std::vector NativeAnimatedModule::ge const auto animatedValueTag = facebook::xplat::jsArgAsInt(args, 2); NativeAnimatedModule::RemoveAnimatedEventFromView(viewTag, eventName, animatedValueTag); }), + Method( + s_startListeningToAnimatedNodeValueName, + [this](folly::dynamic args) { + const auto viewTag = facebook::xplat::jsArgAsInt(args, 0); + NativeAnimatedModule::StartListeningToAnimatedNodeValue(viewTag); + }), + Method( + s_stopListeningToAnimatedNodeValueName, + [this](folly::dynamic args) { + const auto viewTag = facebook::xplat::jsArgAsInt(args, 0); + NativeAnimatedModule::StopListeningToAnimatedNodeValue(viewTag); + }), }; } diff --git a/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.h b/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.h index 5534cb5a817..087bea10cb3 100644 --- a/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.h +++ b/vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.h @@ -109,6 +109,8 @@ class NativeAnimatedModule final : public facebook::xplat::module::CxxModule { static const char *s_extractAnimatedNodeOffsetName; static const char *s_addAnimatedEventToViewName; static const char *s_removeAnimatedEventFromViewName; + static const char *s_startListeningToAnimatedNodeValueName; + static const char *s_stopListeningToAnimatedNodeValueName; }; } // namespace uwp } // namespace react