From 280ed810b0ee645df0c82c58ce5d0076f5b4dc5a Mon Sep 17 00:00:00 2001 From: Emil Ong Date: Tue, 16 May 2017 13:19:11 -0700 Subject: [PATCH] Update docs about supported native animation props Summary: Thanks for submitting a PR! Please read these instructions carefully: - [x] Explain the **motivation** for making this change. - [x] Provide a **test plan** demonstrating that the code is solid. - [x] Match the **code formatting** of the rest of the codebase. - [x] Target the `master` branch, NOT a "stable" branch. The docs had `backgroundColor` listed as a supported style prop for native animation, but only `opacity` and `transform` are supported at this time. See https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/NativeAnimatedHelper.js#L108 My motivation was that I tried to use it and it didn't work. :smile: Github appears to render the change correctly. Closes https://github.com/facebook/react-native/pull/13933 Differential Revision: D5071869 Pulled By: hramos fbshipit-source-id: 947c8fa56b99d99c44603d8ef81664455234ed84 --- docs/Animations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Animations.md b/docs/Animations.md index faaea60ea6c..39f1fecf32e 100644 --- a/docs/Animations.md +++ b/docs/Animations.md @@ -356,7 +356,7 @@ You can also take a look at the [source code](https://github.com/facebook/react- Not everything you can do with `Animated` is currently supported by the native driver. The main limitation is that you can only animate non-layout properties: -things like `transform`, `opacity` and `backgroundColor` will work, but flexbox and position properties will not. +things like `transform` and `opacity` will work, but flexbox and position properties will not. When using `Animated.event`, it will only work with direct events and not bubbling events. This means it does not work with `PanResponder` but does work with things like `ScrollView#onScroll`. @@ -490,4 +490,4 @@ option](http://facebook.github.io/react-native/blog/2017/02/14/using-native-driv You may also want to defer any computationally intensive work until after animations are complete, using the [InteractionManager](docs/interactionmanager.html). You can monitor the -frame rate by using the In-App Developer Menu "FPS Monitor" tool. \ No newline at end of file +frame rate by using the In-App Developer Menu "FPS Monitor" tool.