Imagine you have a live view with multiple "pages" within it that you navigate via
live_patch links. There is a bug where, if you're on say Page 1 and the content is larger than the view port and you've scrolled down somewhat - if you click a
live_patch link to another "page", the content doesn't scroll up. So the content has changed underneath you but you're half way down the page so it's a confusing user experience. You can place
phx-hook="ScrollTopHook" on the
live_patch link and it will scroll the page to the top for you when you click it.