gatsby-plugin-transition-link
gatsby-plugin-transition-link copied to clipboard
AniLink does not update location information when anchor links are used.
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 AniLink
s 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.
Would absolutely love a solution to this too!