You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
True. This is indeed the case with the current implementation. My goal is to only replace main if the surrounding elements are not changed: this avoids unneeded rendering, allows better animation support and toggling the "selected" class name for links. Obviously the goal should also be to fix the issues you brought up. One potentially hacky way could be to compare outerhHTML properties of the old/new header,footer,head elements update accordingly. Thoughts?
Found a nice solution to this one. It now studies the old/new page and only updates if there are changes. Checks all landmark elements: body, header, main, and footer.
nue/packages/nuekit/src/browser/page-router.js
Lines 14 to 23 in 854f20f
The code above is insufficient, if for example I have changing content in my
header
(e.g. I add acurrent
class to the current pages link)I patched it locally by just using the content of the
else
statement, but this is most likely not the best strategy.My code diff
Idk... Maybe analyzing if the content of header and/or footer is static on build time is the way to go?
Just realized, that the same also goes for the
<head>
. E.g. description or OG image, etc.The text was updated successfully, but these errors were encountered: