Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async function serveReactRoute(req: $Request, res: $Response, next: NextFunction): Promise {
try {
const serverHooks = ServerHooks.map(hookModule => {
const HookClass = getDefault(hookModule);
return new HookClass();
});
try {
const acceptedLanguages = Object.freeze(accept.languages(req.header('Accept-Language')));
const loadableResources = new Map();
const persistentValues = new Map();
let component = (
{/* custom prop injected by universal-cookies */}
{/* $FlowFixMe */}
{rootRoute}
);