When opening a FAQ in static page, it sets opened FAQ id to URL. When that URL is loaded, the browser opens the linked FAQ and scrolls to it automatically.
Cons:
uses window.location.hash for reading because getInitialProps does not support hashes, it's run in server-side
uses window.history.replaceState for writing because it does not trigger scrolling like Router.replace does
When opening a FAQ in static page, it sets opened FAQ id to URL. When that URL is loaded, the browser opens the linked FAQ and scrolls to it automatically.
Cons:
window.location.hash
for reading becausegetInitialProps
does not support hashes, it's run in server-sidewindow.history.replaceState
for writing because it does not trigger scrolling likeRouter.replace
does