T
TanStack3w ago
broad-brown

disabled javascript in browser

I'm not sure that I understand the SSR thing correctly, but in my understanding it means that the ready html is rendered on the server and sent to the browser, so even with JavaScript disabled, the page would look like it should. What I see now is that the doesn't load it's contents if I disable JS. My component is roughly like this:
export const Route = createFileRoute(
"/{-$a}/_layout/_main/_other/b/c/$d/$e"
)({
loader: async ({ params, context }) => {
const data = await context.queryClient.ensureQueryData(
getDataQueryOptions({
d: params.d,
e: params.e,
a: context.a,
})
);
return { data };
},
component: RouteComponent,
});

function RouteComponent() {
const { data } = Route.useLoaderData();
return <> // render data here </>
}
export const Route = createFileRoute(
"/{-$a}/_layout/_main/_other/b/c/$d/$e"
)({
loader: async ({ params, context }) => {
const data = await context.queryClient.ensureQueryData(
getDataQueryOptions({
d: params.d,
e: params.e,
a: context.a,
})
);
return { data };
},
component: RouteComponent,
});

function RouteComponent() {
const { data } = Route.useLoaderData();
return <> // render data here </>
}
With JS enabled the page loads as expected, and I see that in the Network tab there is no any fetch requests from JS. Nevertheless, if I turn off the JS, the page is empty..
2 Replies
rival-black
rival-black2w ago
are you on the latest start version? we recently fixed a react 19.2 behavior that seems related
broad-brown
broad-brownOP2w ago
I'm on 1.134.13. Will try on the latest!

Did you find this page helpful?