-
Notifications
You must be signed in to change notification settings - Fork 16
Pages are restamped over and over #10
Comments
Thank you for the feature request! This was actually by design, to leverage the vastness of the dom with a lot of pages. I am not sure what the effect would be when designing a hybrid version between this element and the Lastly I would be very interested in what others think of this feature. Is this a highly-requested feature or a one-time usecase? Just to know if it is worth to implement this extra feature for the added complexity + payload. |
Thanks for sharing your thoughts, Tim. It would be interesting to understand better the use case for which you build Here is why/how we use lazy loading of pages:
I'm not sure if this matches the use case that you had in mind when building the element. If yes: Which pattern do you suggest to keep page-level state (e.g. which tab on the page is selected or cache loaded page-level data)? PS: We took a lot of inspiration from the guidance on recommended usage of conditional templates (see below the code example): https://www.polymer-project.org/1.0/docs/devguide/templates.html#dom-if |
After a quick discussion in Slack and the documentation, I think it is fair to add this feature. The only doubts I have is for the default behavior. If we change it now to non-restamping, it might break user application relying on this fact. But bumping to 2.0 for this element is imo not wanted either. E.g. I do not know what the consequences are for changing the behavior at this point. However, I doubt very many users use this element just yet, so maybe the small subset that does rely on the behavior is managable. |
Hello, Actually i wanted to test this element and in my opinion it should restamp elements by default - or at least have this as an option. |
Thanks, for some reason i missed this in the documentation, i thought it is default behavior :-) |
I've two pages:
When the user toggles between the two pages, my pages are restamped each time. This is especially tricky if a page holds state (e.g. load data from the backend or stay on a specific tab within the page).
Is there a way to activate the
dom-if
behavior (https://www.polymer-project.org/1.0/docs/devguide/templates.html#dom-if)?restamp
property.The text was updated successfully, but these errors were encountered: