I as hoping to get a better understanding of what actually goes on when e.g a new route is transitioned to when clicking or doing it programmatically.
More specifically, I was wondering what do we actually get back in the session listener.
For instance, when this is triggered
session.listen((route) => {
// is Route a new object, or a mutated one?
// What is the absolute way to check for equality from previously stored route
})
Are we making the assumption that it's a whole new object?
Thus it would fail a reference check with previously stored, even though the values are the same?
Can you take it at face value that route.href is the object serialized and can be used for string checks for equality instead?
When would the listener trigger and when wouldn't it?
Would the same plain route trigger it twice?
Would the same route but with different query params, trigger it?
I as hoping to get a better understanding of what actually goes on when e.g a new route is transitioned to when clicking or doing it programmatically.
More specifically, I was wondering what do we actually get back in the session listener.
For instance, when this is triggered
route.href
is the object serialized and can be used for string checks for equality instead?