我想弄清楚什么时候Animated.spring事件已经完成,所以我可以更新一些状态。Animated.spring结束事件
我试过这个,但是在这里抛出一个未定义的错误;
Animated.spring(
this.state.pan,
{ toValue: { x: 0, y: -500 } }
).start().finish(
this.setState({
carousel: false, hasNotification: false
})
);
其他处理这个问题的方法?
感谢