How to customize entry.server.tsx with Vercel's React Router SDK?

I’m working on a React Router application deployed on Vercel that requires internationalization using i18next. According to the documentation, we should use Vercel’s handleRequest from @vercel/react-router/entry.server for optimal performance.

However, I’m facing a challenge in integrating remix-i18next with this setup. The remix-i18next documentation requires wrapping the app with I18nextProvider during server-side rendering, but Vercel’s handleRequest doesn’t seem to provide a way to customize the root component.

Questions:
Is there a way to customize the root component when using Vercel’s handleRequest?

Any guidance or examples would be greatly appreciated!

The documented answer has it all wrapped up in handleRequest, but if you want to customize the internals I’d copy/paste the implementation @vercel/react-router directly and then you can follow Sergio’s instructions more closely

1 Like

Thanks for your prompt reply.
I have taken your approach :grinning_face_with_smiling_eyes:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.