TylerBarnes / gatsby-plugin-transition-link

A link component for page transitions in gatsby
537 stars 71 forks source link

Trigger onExit event programmatically #257

Open marcwieland95 opened 3 years ago

marcwieland95 commented 3 years ago

Hi there,

I was playing around with the plugin for a while a made a fancy transition. Now I've got one problem which is that I can't tell in advance how long a page takes until I can start the animation.

Improvement

So I can't set the length of the exit. Is there an option to trigger the onExit programmatically after my page transition completes without knowing the exact time previously? That would be super helpful.

Current state

My current state is that I set a higher value to the exit length to make sure the old page is not disappearing during the animation. But with that, I have the issue that the page is blocked for a couple of seconds when the page is loaded very fast since all links are not working (which is understandable during an animation).