From 3fadd740037fc8a4c591e5f7fd927ebb406a07b4 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Fri, 28 Jul 2017 07:33:27 -0700 Subject: [PATCH] =?UTF-8?q?Update=20performance.md=20to=20reflect=20existe?= =?UTF-8?q?nce=20of=20`useNativeDriver`=20in=20An=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: …imated API Closes https://github.com/facebook/react-native/pull/15215 Differential Revision: D5501206 Pulled By: hramos fbshipit-source-id: 827494688f405de3e84401460bddf5df17aa497b --- docs/Performance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Performance.md b/docs/Performance.md index 69d85f10d1d..2d21d446fc2 100644 --- a/docs/Performance.md +++ b/docs/Performance.md @@ -101,7 +101,7 @@ Similarly, you can implement `shouldComponentUpdate` and indicate the exact cond "Slow Navigator transitions" is the most common manifestation of this, but there are other times this can happen. Using InteractionManager can be a good approach, but if the user experience cost is too high to delay work during an animation, then you might want to consider LayoutAnimation. -The Animated api currently calculates each keyframe on-demand on the JavaScript thread, while LayoutAnimation leverages Core Animation and is unaffected by JS thread and main thread frame drops. +The Animated API currently calculates each keyframe on-demand on the JavaScript thread unless you [set `useNativeDriver: true`](https://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html#how-do-i-use-this-in-my-app), while LayoutAnimation leverages Core Animation and is unaffected by JS thread and main thread frame drops. One case where I have used this is for animating in a modal (sliding down from top and fading in a translucent overlay) while initializing and perhaps receiving responses for several network requests, rendering the contents of the modal, and updating the view where the modal was opened from. See the Animations guide for more information about how to use LayoutAnimation.