SolidJSS
SolidJSβ€’4y agoβ€’
31 replies
Katja (katywings)

Lazy in For results in renderToString timed out in production build

Using a bare solid-start project with the following code, and running the prod build of it, results in a "renderToString timed out". To be precise: the first request results in this time out. Every further request works without timeout.

Node version: v16.13.0

import { For, lazy } from "solid-js";

const LazyCounter = lazy(async() => import('~/components/Counter'))

export default function Home() {
  return (
    <main>
      <For each={[1,2,3]}>
        {() => {
          return <LazyCounter />
        }}
      </For>
    </main>
  );
}
Bildschirmfoto_vom_2022-12-13_22-16-36.png
Was this page helpful?