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
solid / start : createAsync/createResource mixes results when run server side, when component has "unstable" execution. due to secondary rerun of the suspended component. #2517
createAsync/createResource mixes results when run server side, when component has "unstable" execution. due to secondary rerun of the suspended component. and incorrect mapping.
go directly to the /about in the browser not via the link
observe the logs
Expected behavior
if(shouldRedirect()){console.log('LATER');console.log('A:',aAsy());// expected "A: a" actual "A: b"console.log('B:',bAsy());// expected "B: b" actual "B: a"}else{console.log('INITIAL');console.log('A:',aAsy());// should be undefinedconsole.log('B:',bAsy());// should be undefined}
Screenshots or Videos
msedge_QeCu93gKAj.mp4
Platform
online playground
Additional context
if(shouldRedirect()){// later// if we flip back the order it will become stable againaAsy=createAsync(()=>a());bAsy=createAsync(()=>b());// bAsy = createAsync(() => b());// aAsy = createAsync(() => a());}else{// initialbAsy=createAsync(()=>b());aAsy=createAsync(()=>a());}
solid re runs the suspended component
on the 2nd run it tries to match the results based on the original (initial)
order of requests.
because we flip the createAsync order on the "later" phase
the results are matched incorrectly.