Constimport { servicesContext } from '@setu-ts/react-router-plugin';
import { CAPABILITIES, type ILogger } from '@setu-ts/common';
export async function loader({ context }: Route.LoaderArgs) {
const services = context.get(servicesContext);
services?.get<ILogger>(CAPABILITIES.LOGGER).info('ssr loader');
return { ok: true };
}
Key holding the kernel
IServiceRegistryfor the current request.Always set by the plugin, so
context.get(servicesContext)never returns thenulldefault on a request served through the SSR catch-all. The| nullin the type exists only because the key needs a default at all — React Router'sget()throws for an unset key that has none.