Is there a plugin-API for before a new page is loaded / while a page is loading?
I have a problem where I’m changing styles on the navbar depending on the page by using the onPageChange API. Unfortunately this means that when someone is navigating around my site, the navbar changes are not taking place until the new page is loaded. So going from a page where I have a transparent navbar to a page where I have a solid one, the transparent navbar is visible until the new page has completed loading (i.e. while the spinner is present). This is a bad look so I’m looking for a solution.
Any suggestions would be greatly appreciated. Thank you!