we have created our design system with a few regular anchor tags in the components. now the problem is, while using those components in gatsby, the whole page is getting reloaded while Navigating to a new page due to regular anchor tags. I know that gatsby has a Link
component but we can't implement this in our library, So is there any way to overcome this issue?
After a few hours of searching through the internet, finally, I found the solution for the above issue, I have tried gatsby-plugin-catch-links this plugin internally uses an anchor tag with the event.preventDefault() for preventing the page from reloading & detects click event & applies it to navigate programmatically using gatsby's navigate()
hook, So finally it resolves my issue.