Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/menu-button-hydration-drift-5226.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/web": patch
---

Dev hydration key-miss warning names the client-only-allocation drift class (#5226)
7 changes: 7 additions & 0 deletions packages/web/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,13 @@ export function getNextElement(template) {
`server render, wrap the document shell in <NoHydration> and re-enter with ` +
`<Hydration> around the hydrated subtree (or pass hydrate() a renderId matching ` +
`the server's <Hydration id>).` +
// The sequence drifts by every computation one build creates and the
// other does not; a primitive that returns early under `isServer`
// and only then allocates (an effect, a memo) shifts every key
// claimed after it (#5226).
` A library or primitive that skips allocations on the server (an early ` +
`\`if (isServer) return\` before creating effects or memos) drifts the client's ` +
`sequence ahead of the server's the same way.` +
// The parser drops a <form> start tag inside an open <form>: the
// element never exists, so its key finds nothing (#4875).
(template._html && template._html.startsWith("<form")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "menu-button-chain-5226",
"shell": "<sm-navigation-rail _hk=6 role=\"navigation\" aria-label=\"Primary\"><div class=\"rail-container\"><div class=\"rail\"><md-elevation></md-elevation><div class=\"menu-fab\"><sm-icon-button _hk=9b0 data-width=\"default\"><sm-button data-variant=\"text\" data-size=\"small\" data-toggle=\"false\"><button _hk=9b20 type=\"button\" role=\"switch\" aria-label=\"Open menu\" aria-checked=\"false\"><md-elevation _hk=9b22></md-elevation><md-icon _hk=9b250 aria-hidden><i _hk=9b2530>menu-icon</i></md-icon></button></sm-button></sm-icon-button></div><div class=\"center-items\"><div tabindex=\"-1\" role=\"menubar\" aria-orientation=\"vertical\"></div></div></div></div><!--$--><main _hk=a0><p>page content</p></main><!--/--></sm-navigation-rail>",
"rest": ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "menu-button-chain-aligned-5226",
"shell": "<sm-navigation-rail _hk=6 role=\"navigation\" aria-label=\"Primary\"><div class=\"rail-container\"><div class=\"rail\"><md-elevation></md-elevation><div class=\"menu-fab\"><sm-icon-button _hk=9e0 data-width=\"default\"><sm-button data-variant=\"text\" data-size=\"small\" data-toggle=\"false\"><button _hk=9e20 type=\"button\" role=\"switch\" aria-label=\"Open menu\" aria-checked=\"false\"><md-elevation _hk=9e22></md-elevation><md-icon _hk=9e250 aria-hidden><i _hk=9e2530>menu-icon</i></md-icon></button></sm-button></sm-icon-button></div><div class=\"center-items\"><div tabindex=\"-1\" role=\"menubar\" aria-orientation=\"vertical\"></div></div></div></div><!--$--><main _hk=a0><p>page content</p></main><!--/--></sm-navigation-rail>",
"rest": ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"shell": "<html _hk=0 lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>menu button chain</title><!--$--><script>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute(\"_hk\")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));[\"click\",\"input\"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let n=o.composedPath&&o.composedPath()[0]||o.target,s=t(n);s&&!e.completed.has(s)&&e.events.push([s,o,n])}))))})(_$HY={events:[],completed:new WeakSet,r:new Proxy({},{set:(r,k,v)=>(v instanceof Promise&&v.catch(()=>{}),r[k]=v,!0)}),s:{},fe(){}});</script><!--xs--><!--/--></head><body><sm-navigation-rail _hk=16 role=\"navigation\" aria-label=\"Primary\"><div class=\"rail-container\"><div class=\"rail\"><md-elevation></md-elevation><div class=\"menu-fab\"><sm-icon-button _hk=19b0 data-width=\"default\"><sm-button data-variant=\"text\" data-size=\"small\" data-toggle=\"false\"><button _hk=19b20 type=\"button\" role=\"switch\" aria-label=\"Open menu\" aria-checked=\"false\"><md-elevation _hk=19b22></md-elevation><md-icon _hk=19b250 aria-hidden><i _hk=19b2530>menu-icon</i></md-icon></button></sm-button></sm-icon-button></div><div class=\"center-items\"><div tabindex=\"-1\" role=\"menubar\" aria-orientation=\"vertical\"></div></div></div></div><!--$--><main _hk=1a0><p>page content</p></main><!--/--></sm-navigation-rail><script>_$HY.s[\"\"]=1,_$HY.sw&&_$HY.sw(\"\")</script></body></html>",
"chunks": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"shell": "<html _hk=0 lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>menu button chain</title><!--$--><script>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute(\"_hk\")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));[\"click\",\"input\"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let n=o.composedPath&&o.composedPath()[0]||o.target,s=t(n);s&&!e.completed.has(s)&&e.events.push([s,o,n])}))))})(_$HY={events:[],completed:new WeakSet,r:new Proxy({},{set:(r,k,v)=>(v instanceof Promise&&v.catch(()=>{}),r[k]=v,!0)}),s:{},fe(){}});</script><!--xs--><!--/--></head><body><sm-navigation-rail _hk=16 role=\"navigation\" aria-label=\"Primary\"><div class=\"rail-container\"><div class=\"rail\"><md-elevation></md-elevation><div class=\"menu-fab\"><sm-icon-button _hk=19e0 data-width=\"default\"><sm-button data-variant=\"text\" data-size=\"small\" data-toggle=\"false\"><button _hk=19e20 type=\"button\" role=\"switch\" aria-label=\"Open menu\" aria-checked=\"false\"><md-elevation _hk=19e22></md-elevation><md-icon _hk=19e250 aria-hidden><i _hk=19e2530>menu-icon</i></md-icon></button></sm-button></sm-icon-button></div><div class=\"center-items\"><div tabindex=\"-1\" role=\"menubar\" aria-orientation=\"vertical\"></div></div></div></div><!--$--><main _hk=1a0><p>page content</p></main><!--/--></sm-navigation-rail><script>_$HY.s[\"\"]=1,_$HY.sw&&_$HY.sw(\"\")</script></body></html>",
"chunks": []
}
Loading
Loading