Next.js Discord

Discord Forum

Help with scrolling behaviour upon navigation

Unanswered
Southern African anchovy posted this in #help-forum
Open in Discord
Southern African anchovyOP
Hi, Just askinghere because I am confused. I am building a site with an endless feed of articles. When your view is over a certain article the URL changes and new articles load in/unload. (I pass scroll:false to router.push)

Now I was under the imprssion I will need to build a custom hooh that will mainatin the scroll position relative to the current element. However it seems that that is the default behaviour? Is it supposed to work like that? If so, what does it maintain relative position to upon the DOM change? I am having trouble finding any concrete information about this.

0 Replies