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
{{ message }}
Repository navigation
[🐞] <Pending> child reading a signal from its owner breaks when the owner re-renders (consumerBackRef[_EFFECT_BACK_REF].set is not a function) #9166
A component inside <Pending> reads a signal passed in as a prop by the component that renders the <Pending>. When that owner re-renders on the client, the update breaks:
Dev:consumerBackRef[_EFFECT_BACK_REF].set is not a function is thrown and the owner's DOM change never appears.
Production: no error, but the <Pending> fallback becomes visible and the child is rendered a second time next to the original.
No async work or out-of-order streaming is needed: the content renders in order and nothing ever suspends.
These don't trigger it:
<Pending> with only static content.
Reading the signal inline inside <Pending> (<p>{text.value}</p>).
A child that reads its own signal instead of one passed from the owner.
import{component$,Pending,useSignal,typeSignal}from'@qwik.dev/core';constReader=component$<{value: Signal<string>}>(({ value })=><p>{value.value}</p>);// The owner re-renders structurally while a child inside <Pending> reads its signal.exportdefaultcomponent$(()=>{conston=useSignal(false);consttext=useSignal('hello');return(<><buttononClick$={()=>(on.value=!on.value)}>toggle</button>{on.value&&<b>on</b>}<Pendingfallback$={()=><p>loading…</p>}><Readervalue={text}/></Pending></>);});
Steps to reproduce
Open the reproduction (experimental: ['pendingBoundary'] is enabled in qwikVite()).
Click toggle.
Expected:<b>on</b> appears; nothing else changes.
Actual (dev): the console shows QWIK ERROR consumerBackRef[_EFFECT_BACK_REF].set is not a function and <b>on</b> never appears.
Actual (production build): no error, but after the click the page shows <b>on</b>, the visible fallback <p>loading…</p>, and a second <p>hello</p> beside the original.
Activity
fix(core): keep Pending content visible when its owner re-renders aft…
fix(core): keep Pending content visible when its owner re-renders aft…
fix(core): keep Pending content visible when its owner re-renders aft…