mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 09:23:16 +08:00
Rename setTiming to applyAnimation
Summary:Given that you can do all kinds of animations other than `Animated.timing`, it made no sense to have `setTiming`. In addition, you can't intuitively tell that this is the callback where you would do custom animations. The discussion took place on Discord with ericvicenti: https://discordapp.com/channels/102860784329052160/154015578669973504 Closes https://github.com/facebook/react-native/pull/6235 Differential Revision: D2999121 Pulled By: hedgerwang fb-gh-sync-id: f587b865de11ba5e8dc9c430720252ffb5d12794 shipit-source-id: f587b865de11ba5e8dc9c430720252ffb5d12794
This commit is contained in:
committed by
Facebook Github Bot 0
parent
6470ff842b
commit
f2483eb1ee
@@ -78,7 +78,7 @@ class NavigationAnimatedExample extends React.Component {
|
||||
navigationState={navigationState}
|
||||
style={styles.animatedView}
|
||||
renderOverlay={this._renderHeader}
|
||||
setTiming={(pos, navState) => {
|
||||
applyAnimation={(pos, navState) => {
|
||||
Animated.timing(pos, {toValue: navState.index, duration: 1000}).start();
|
||||
}}
|
||||
renderScene={this._renderCard}
|
||||
|
||||
Reference in New Issue
Block a user