Skip to content

fix: resolve react error 310 and i18n issues#2

Merged
creatorcluster merged 1 commit intomainfrom
fix-react-error-310
Jul 14, 2025
Merged

fix: resolve react error 310 and i18n issues#2
creatorcluster merged 1 commit intomainfrom
fix-react-error-310

Conversation

@creatorcluster
Copy link
Owner

This commit resolves two issues:

  1. React Error #310: This error was caused by conditional rendering of hooks. I moved the i18n initialization from App.tsx to main.tsx to ensure that the App component is only rendered after the i18n library is fully initialized.

  2. i18n Translation Issues: After moving the i18n initialization, the translation keys were being displayed instead of the translated text. This was because the i18n instance was not being properly passed to the I18nextProvider. I moved the I18nextProvider to main.tsx and the i18n instance is now correctly passed to it.

This commit resolves two issues:

1.  **React Error #310:** This error was caused by conditional rendering of hooks. I moved the i18n initialization from `App.tsx` to `main.tsx` to ensure that the `App` component is only rendered after the i18n library is fully initialized.

2.  **i18n Translation Issues:** After moving the i18n initialization, the translation keys were being displayed instead of the translated text. This was because the `i18n` instance was not being properly passed to the `I18nextProvider`. I moved the `I18nextProvider` to `main.tsx` and the `i18n` instance is now correctly passed to it.
@vercel
Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
renderdragon ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 10:59am

@creatorcluster creatorcluster merged commit f6a1f33 into main Jul 14, 2025
2 checks passed
creatorcluster pushed a commit that referenced this pull request Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant