mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 06:04:15 +00:00
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 https://github.com/facebook/react-native/pull/15215 Differential Revision: D5501206 Pulled By: hramos fbshipit-source-id: 827494688f405de3e84401460bddf5df17aa497b
This commit is contained in:
parent
292f801c1c
commit
3fadd74003
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user