mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-02 09:18:38 +08:00
fix: defer running the animation to next frame
This commit is contained in:
@@ -261,7 +261,9 @@ export default class Card extends React.Component<Props> {
|
||||
// If the style updates during render, setting the value here doesn't work
|
||||
// We need to defer it a bit so the animation starts properly
|
||||
requestAnimationFrame(() =>
|
||||
this.isClosing.setValue(closing ? TRUE : FALSE)
|
||||
requestAnimationFrame(() =>
|
||||
this.isClosing.setValue(closing ? TRUE : FALSE)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user