Git Product home page Git Product logo

Comments (5)

cdata avatar cdata commented on June 19, 2024

The problem appears to be related to tail, which is not nulled-out or emptied out when it no longer corresponds to the current global path.

from app-route.

cdata avatar cdata commented on June 19, 2024

Ah yes, this: https://github.com/PolymerElements/carbon-route/blob/master/carbon-route.html#L176-L177

To clear or not to clear: that is the question.

from app-route.

cdata avatar cdata commented on June 19, 2024

P.S. I believe that this is the cause of the state leak that I referred to here. I suspect it goes like this: the objects are not cleared, so the queryParams changes - due to late-firing events from the YouTube element - bounce back up the tree via tail and cause the query string to go from empty to populated unexpectedly.

from app-route.

rictic avatar rictic commented on June 19, 2024

Interesting. I think this makes for a pretty good argument that the default behavior should be nulling out properties when a route no longer matches, and the case where you want to keep some information alive in an element should be the special case.

Making active work wouldn't be too hard I suspect, the tricky bit would be blocking queryParams in inactive routes while maintaining their state. I think you'd have to copy the queryParams object, which seems complex and inefficient.

@sjmiles

from app-route.

cdata avatar cdata commented on June 19, 2024

the default behavior should be nulling out properties when a route no longer matches

I think this makes a lot of sense for the first release. Maintaining state in inactive trees has a lot of subtle side-effects, especially when those trees may affect that state asynchronously.

I think you'd have to copy the queryParams object, which seems complex and inefficient

I agree, also you need to manually propagate changes (when appropriate) if you take this approach.

from app-route.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.