@umituz/react-native-localization 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-localization",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "Universal localization system for React Native apps with i18n support",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -266,16 +266,9 @@ const initializeI18n = () => {
266
266
  }
267
267
  };
268
268
 
269
- // Defer initialization until React is ready
270
- // React Native doesn't have window, so we check for global
271
- if (typeof global !== 'undefined') {
272
- // Use setTimeout to defer initialization
273
- setTimeout(() => {
274
- initializeI18n();
275
- }, 0);
276
- } else {
277
- // Fallback: initialize immediately
278
- initializeI18n();
279
- }
269
+ // Initialize immediately - no need to defer
270
+ // React Native and React are ready when this module loads
271
+ // Deferring causes race conditions with useTranslation hook
272
+ initializeI18n();
280
273
 
281
274
  export default i18n;