mongkuen / gatsby-plugin-page-transitions

Gatsby plugin to set page transitions
MIT License
40 stars 21 forks source link

Transitions don't exit #10

Open deanzod opened 6 years ago

deanzod commented 6 years ago

I downloaded the gatsby-starter-wordpress and added the plugin then wrapped a page element exactly as described in the docs. I can see the transition works on entering but if I click a link to a new page, the content immediately changes to the new page content and runs the entering transition. I expected it to pause, run the exiting transition, then resume (change the content) and run the entering transition on the new content.

I did notice the exited transition runs, but only after the content has changed which defeats the purpose really.

Is there a specific way to get transitions to work with this?

struct78 commented 5 years ago

@deanzod This is due to the change in router with Gatsby 2.x - if you downgrade to Gatsby ^1.9.277 it will work. #5

cmdalbem commented 5 years ago

@struct78 what would you think of we adding this note on the plugin readme? This seem like a very importante information, that users should know beforehand when considering its use.

JoleMile commented 5 years ago

Adding it to the readme would be great. I spent almost an hour trying to figure out why isn't it working :D

mongkuen commented 5 years ago

Sorry for the lack of updates, but effectively the set of features I built for v1 is simply not possible with v2.

I should've given the documentation an update and I apologize for causing quite the length of confusion users have had.

I've written a new README that has a detailed description of the issue (It's not simply changing replaceHistory with onRouteUpdate as the v1 > v2 documentation suggests), but the Gatsby team has still provided an example on how you could get page transitions to work and I've described why their approach works the way it does.

I'm leaving this issue open for comment, but hopefully this is helpful. Again, apologies for all the confusion this must've caused.