TylerBarnes / gatsby-plugin-transition-link

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

AniLink does not update location information when anchor links are used. #235

Open Kinyugo opened 4 years ago

Kinyugo commented 4 years ago

I am using AniLink to transition between pages. However, my site also includes anchor links, for these anchor links I have a custom getProps function that is passed to then to update the activeClassName based on the hash field in the location object. I have noted that when I use AniLink for my links, say for example /#contact the address bar in the browser does not update unless the previous address was on a different pathname, for example /blog, still in that case the address bar updates to / only. I have been digging through AniLinks source code, and it uses Link component from gatsby internally, which works perfectly. I thought this being the case AniLink would update the location object as required and also handle getProps since my classes are also not being updated.

sathyaram commented 3 years ago

Would absolutely love a solution to this too!