spiceflow@1.26.0-rsc.15
·
29 commits
to main
since this release
-
Fixed SSR infinite recursion with wildcard layouts across mounted apps — registering a wildcard layout on a parent app that mounts a child app via
.use()(where the child also registers its own/*layout) crashed every page render withMaximum call stack size exceeded:const app = new Spiceflow() .layout('/*', ({ children }) => <>{children}</>) // e.g. inject global analytics .page('/login', () => <Login />) .use(docsApp) // child app with its own .layout('/*')
Layout ids were only unique per Spiceflow instance, so both
/*layouts shared the same id and the layout resolver made the child layout render itself recursively. Ids are now uniquified per request, and the parent wildcard layout wraps child app pages exactly once as the outermost layout.This is the recommended pattern for injecting a global client component (analytics, error reporting) across an entire site including mounted sub-apps.