Our great sponsors
-
When I started using next-i18next, I realized next dev server only loaded the translation files once when initialized and never updated even if I reloaded the page on my browser since server side doesn't change. Whenever I updated the translation, I needed to restart next dev server, which was bad developer experience.
-
Nodemon.io
Monitor for any changes in your node.js application and automatically restart the server - perfect for development
The option 1 is simple and nodemon can easily achieve the goal. However, this is not "Fast Refresh" and takes a while.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
The option 2 seems better because next dev server keeps running, but too complicated to implement internal API. It can be done without API like next-remote-watch which monitors files and calls Next.js's internal method to reload the page. I tried it but it still requires implementation of content refresh by calling i18n.reloadResources() anyway. Also, page refresh is not "Fast Refresh" neither.
Related posts
- Say Goodbye to Docker Volumes 👋
- Set up Hot Reload for Typescript ESM projects
- Guia para Iniciantes: Criando uma API com Node.js, PostgreSQL e Padrão MVC
- Building a React/Express Stripe Donation Form
- Best ways to fix Nodemon error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system.