This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
Updated gatsby and added a function in gatsby-browser.js to enable scroll to hashtag #175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:

On /docs' Run Core Node - configuring, for example, if you click links that are targeting hash links. They won't work most of the time (some of the hash links I clicked for the first time worked; I've tried multiple times on incognito, but happens randomly).
Gatsby's Recommendations for programmatic, in-app navigation recommends to use an
anchor tag
(which what we were already using) orreach/router
'snavigate
.UPDATING GATSBY AND ITS DEPENDENCIES
I thought maybe updating gatsby would fix scrolling issues but it did not! But I think it's good to keep our dependencies updated so making a PR of it anyway.
I did
yarn outdated
and installed to the version underWanted
- double checked locally, didn't see any issues.Scroll to a hash tag section when anchor hash tag is clicked
<h2/>
tag and it didn't work. I couldn't figure out why even by reading MDX documentation. I decided to usegatsby-browser.js
'sshouldUpdateScroll
function to target the section