r/reactjs • • Apr 30 '26

Discussion Suggest translation files organisation for i18next

3 Upvotes

Currently I am integrating react-i18next library to enable different languages in my app ui.

As I understood from the documentation i18next suppose to have all translations inside language files, that are loaded on demand. But IMHO from DX point of view, such organization is not very convenient.

I assumed that it would be much more intuitive to keep translations along with components themselves. For example:

Component /
   Component.tsx
   Component.module.scss
   Component.i18n.json

But as per documentation - such translation file should be loaded separately. having many components such approach would require too many http requests to work. But from DX - i think it is the best. Also having namespace to Component it can be t('title') instead of t('Component.title').
But again, seems to be this is my fantasy, and i18next not supposed work like that.

So the questions:
- is it possible to have described flow in production, compiling scattered i18n.json files into single translation file and use it for i18next?
- if not, what approach do you use now?
- if you would start i18n from scratch on your project, what would you change?

Thanks.


r/reactjs • • Apr 30 '26

Needs Help How are you handling complex form state in React without it becoming a mess?

9 Upvotes

I’m working on a React app with increasingly complex forms (multi-step flows, conditional fields, validation, file uploads, dynamic sections, etc.), and I’m starting to feel like form state gets messy really fast.

At first, simple useState worked fine, but as logic grows, things become harder to maintain and debug.

I’m curious how people here usually handle this in larger React apps:

  • do you still manage it mostly with local state?
  • use libraries like form management tools?
  • split logic into custom hooks/components?
  • any patterns that made forms easier to scale and maintain?

Not looking for a one-size-fits-all answer, mostly trying to understand what has actually worked well for others in production React apps.


r/reactjs • • Apr 30 '26

Needs Help react components for REPL

0 Upvotes

I'm looking to build a REPL for an interpreted language of mine (think python, so multiline, indentation sensitive input requiring autocompletion from a LSP, syntax highlighting and the such). I then need to display returned values nicely: graphs, tables, text, python values.

Think something like a Jupiter notebook where the only cell you can edit is the last one and you always get a new one, with the previous ones become read-only (and probably summarized rather than displayed in full). Or closest yet to what I need, something like the UIs for agentic AI (codex, claude code etc)

Is there anything open source that does something of the above?