Level 102
https://github.com/inertiajs/inertia/discussions/1043
So you will probably need to find a way to set recoil to work with ssr and not the other way around
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import { createInertiaApp } from '@inertiajs/inertia-react'
import createServer from '@inertiajs/server'
import { RecoilRoot } from 'recoil'
createServer((page) => createInertiaApp({
page,
render: ReactDOMServer.renderToString,
resolve: name => require(`./Pages/${name}`),
setup: ({ App, props }) =>
<RecoilRoot>
<App {...props} />
</RecoilRoot>
}))
this what i got in terminal
Starting SSR server on port 13714...
Inertia SSR server started.
ReferenceError: window is not defined
Please or to participate in this conversation.