Hey!
I have a collection in my CMS for localizations. It contains two fields; id and text.
Right now I'm fetching every single row and putting them into a Context, then children can use useTranslation and fetch the id they want. This worked fine when I only had a few rows, but now I need to rethink this approach. It's not very effective to send every single localization to the frontend to be hydrated on every page load.
I thought about batching the requests, but I don't think there's a way for me to know which ids the server should provide to the Provider before render, and I don't want to do it after page load and show a spinner for every piece of text.
I don't think I can use a server component for a single localization either because you can't put them in client components.
Any suggestions?