Next.js Discord

Discord Forum

How do you guys store static long strings?

Unanswered
Chartreux posted this in #help-forum
Open in Discord
ChartreuxOP
My site will include some long static strings that appear across multiple pages. I'm considering storing them in a JSON file in the public folder. Is that a good approach in terms of performance?

2 Replies

New Guinea Freshwater Crocodile
It is acceptable and efficient for cache, but may not be ideal for SSR, localization.
For best performance and DX, importing as constants using an i18n library would be great.