Gatsby will handle scroll restoration for you in most cases. However, when you render containers that have their own scroll values, those scroll positions are typically lost between page transitions. To solve that, users can use the
useScrollRestoration hook in their code to tell Gatsby about scroll containers that we should track and restore.
Here is an example of using the
useScrollRestoration hook to render a list of countries in an overflow