solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

SSR render issue `!!function()`

Open Brendan-csel opened this issue 2 years ago • 0 comments

Seeing this behavior when starting from bare template. Also tried updating to latest versions but same...

export default function Home() {
  const alwaysFalse = () => false;
  return (<>
    <h4>Inspect data-value on these paragraphs while refreshing the page...</h4>
    <p data-value={alwaysFalse()}>Server correctly renders data-value="false"</p>
    <p data-value={!!alwaysFalse()}>Server incorrectly renders data-value="true" - then updates client-side</p>
  </>
  );
}

Suggestion on discord in might be related to !!__vite_ssr_import_2__.escape(alwaysFalse, true), false) not calling the function

Repro link on stackblitz (thanks liquid)

Brendan-csel avatar Nov 26 '22 21:11 Brendan-csel