I am currently making a web site on Next.js boilerplate.
My routing code is this. (below)
import Link from 'next/link'
<Link href={{ pathname: '/some-url', query: { param: something } }}>
<div>
<button type="button" onClick={handleClickMore}><span>+ More</span></button>
</div>
</Link>
when I click this <Button>
I do not want scroll position to be moved.
But as you know, it moves to the top when the new page is being routed. Does anyone have any idea about maintaining scroll position when the new paged is being loaded.
<Link scroll={false} href="/"><a>Home</a></Link>
scroll={false}
will disable the scroll to top on page changes for that specific link.
Reference: https://github.com/zeit/next.js/issues/3950