Post

I released a polyfill with pretty good good support for navigation history entries. As I start to think about how to tackle navigation transition lifecycle (Navigate event, cancellation, interceptors, etc.) I was wondering if you have any wisdom to share in the parts you think are impossible? 🙏🏼

Keeping the browser loading spinner going pops to mind, but there may be more. Things like knowing a navigation is just a `hashChange` seems tricky in the case of traversals. As in, how do you know it's same-document or not?

Yeah, hash changes were tricky to handle, but I think I got it down. I was surprised to learn they fire a popstate event! All of my e2e tests around history entries work with both native Navigation or the polyfill so far.

I wouldn’t call it stable yet. It works by patching the history API so that you can use navigation api features in history-based framework routers. I want to make that patching explicitly opt-in so that you could avoid patching altogether and eschew history altogether for a purely navigation router