Skip to content

Instantly share code, notes, and snippets.

@dbismut
Last active April 9, 2018 08:04
Show Gist options
  • Save dbismut/1635f5e139bcfcd87218f0fe2534f518 to your computer and use it in GitHub Desktop.
Save dbismut/1635f5e139bcfcd87218f0fe2534f518 to your computer and use it in GitHub Desktop.
Part 2 - Animating the exiting transition
executeExitingTransition = (node, done) => {
spring({
from: this.from,
to: this.to,
stiffness: 100,
damping: 12,
restDelta: true,
restSpeed: 0.1
}).start({
update: this.postStyler.set,
complete: () => {
const scrollTop = -this.pageListStyler.get('top');
this.pageListStyler.set({ position: 'absolute', top: 0 });
windowScroll.set('top', scrollTop);
done();
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment