Permalink
Browse files

Update performance.md to reflect existence of `useNativeDriver` in An…

Summary:
…imated API

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes #15215

Differential Revision: D5501206

Pulled By: hramos

fbshipit-source-id: 827494688f405de3e84401460bddf5df17aa497b
  • Loading branch information...
abi authored and facebook-github-bot committed Jul 28, 2017
1 parent 292f801 commit 3fadd740037fc8a4c591e5f7fd927ebb406a07b4
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/Performance.md
View
@@ -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.

0 comments on commit 3fadd74

Please sign in to comment.