mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Updated docs for next
This commit is contained in:
@@ -190,7 +190,7 @@ the animation will always run a frame behind the gesture due to the async nature
|
||||
then loading the Native Animated Example.
|
||||
You can also take a look at the <a href="https://github.com/facebook/react-native/blob/master/RNTester/js/NativeAnimationsExample.js" target="_blank">source code</a> to learn how these examples were produced.</p><h4><a class="anchor" name="caveats"></a>Caveats <a class="hash-link" href="docs/animations.html#caveats">#</a></h4><p>Not everything you can do with <code>Animated</code> is currently supported by the native driver.
|
||||
The main limitation is that you can only animate non-layout properties:
|
||||
things like <code>transform</code>, <code>opacity</code> and <code>backgroundColor</code> will work, but flexbox and position properties will not.
|
||||
things like <code>transform</code> and <code>opacity</code> will work, but flexbox and position properties will not.
|
||||
When using <code>Animated.event</code>, it will only work with direct events and not bubbling events.
|
||||
This means it does not work with <code>PanResponder</code> but does work with things like <code>ScrollView#onScroll</code>.</p><h3><a class="anchor" name="additional-examples"></a>Additional examples <a class="hash-link" href="docs/animations.html#additional-examples">#</a></h3><p>The RNTester app has various examples of <code>Animated</code> in use:</p><ul><li><a href="https://github.com/facebook/react-native/tree/master/Examples/RNTester/js/AnimatedGratuitousApp" target="_blank">AnimatedGratuitousApp</a></li><li><a href="https://github.com/facebook/react-native/blob/master/Examples/RNTester/js/NativeAnimationsExample.js" target="_blank">NativeAnimationsExample</a></li></ul><h2><a class="anchor" name="layoutanimation-api"></a><code>LayoutAnimation</code> API <a class="hash-link" href="docs/animations.html#layoutanimation-api">#</a></h2><p><code>LayoutAnimation</code> allows you to globally configure <code>create</code> and <code>update</code>
|
||||
animations that will be used for all views in the next render/layout cycle.
|
||||
|
||||
Reference in New Issue
Block a user