Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

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

Open
Kinyugo opened this issue Oct 8, 2020 · 1 comment
Open

Comments

@Kinyugo
Copy link

Kinyugo commented Oct 8, 2020

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
Copy link

Would absolutely love a solution to this too!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants