[Compiler Bug]: A bug with i18n translation after react compiler
What kind of issue is this?
- [X] React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- [ ] babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- [ ] eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
- [ ] react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
https://github.com/YYGod0120/yyblog
Repro steps
- Change the var in
app/[language]/components/Typewrite.tsxto const (use var to skip the compiler and fix the bug) - use
pnpm devto start project - Click twice on the
lanswitcherand find that theBanneris not translated after the second click.
How often does this bug happen?
Every time
What version of React are you using?
v19.0.0-rc-3f1436cca1-20240516
#15038 involves i18n and deals with errors caused by instantiating i18next when dynamically combining multiple applications. Though the descriptions vary slightly, both issues revolve around i18n and potential related problems. There might be some common patterns or issues among them.
#15038 involves i18n and deals with errors caused by instantiating i18next when dynamically combining multiple applications. Though the descriptions vary slightly, both issues revolve around i18n and potential related problems. There might be some common patterns or issues among them.
Thank you for your advise. I don't know if it's a problem with i18n or react-compiler. After I skipped compile, the display was normal and I didn't see any errors. So I prefer it to be a compiler problem.
By the way, I moved the problem to the branch of compilerBug. I bypassed this problem on the main branch and updated it.