Reputation: 7821
I must be missing something really simple, but can someone help me understand why the two in-route anchors do not have any effect in the Gatsby sandbox:
https://codesandbox.io/s/k59wzx899r
PS: Regular anchor tags should be used for in-route links in Gatsby (ref. docs). Also, it works on local build.
Thank you.
Upvotes: 1
Views: 318
Reputation: 123
I tested it in both development and production and it seems to work after changing the div's id to "foo" rather than "#foo". It still didn't work in CodeSandbox after making that change though, so I'm thinking that it might be something to do with their app. The production one I did is here: https://anchortest.netlify.com
I would have done this in the comments, but my rep is below 50.
Upvotes: 2