fix: defer running the animation to next frame

This commit is contained in:
satyajit.happy
2019-09-22 01:27:14 +02:00
parent 9208f6457e
commit e08ad8fe66

View File

@@ -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)
)
);
}
}