Skip to content

Better understanding of internals and what changes between events.  #110

@seivan

Description

@seivan

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
  })
  1. Are we making the assumption that it's a whole new object?
  2. Thus it would fail a reference check with previously stored, even though the values are the same?
  3. Can you take it at face value that route.href is the object serialized and can be used for string checks for equality instead?
  4. When would the listener trigger and when wouldn't it?
  5. Would the same plain route trigger it twice?
  6. Would the same route but with different query params, trigger it?
  7. What about exact same query and params but state?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions