@umituz/react-native-design-system 2.11.7 → 2.11.8

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-design-system",
3
- "version": "2.11.7",
3
+ "version": "2.11.8",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -47,14 +47,17 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
47
47
  const setThemeMode = useThemeStore((state) => state.setThemeMode);
48
48
  const setCustomColors = useDesignSystemTheme((state) => state.setCustomColors);
49
49
  const setGlobalThemeMode = useDesignSystemTheme((state) => state.setThemeMode);
50
- const setIconConfig = useIconStore((state) => state.setConfig);
51
50
 
52
- useEffect(() => {
53
- // Set icon config (required)
54
- if (iconRenderer && iconNames) {
55
- setIconConfig(iconNames, iconRenderer);
51
+ // Set icon config SYNCHRONOUSLY before first render
52
+ // This ensures icons are available immediately
53
+ if (iconRenderer && iconNames) {
54
+ const store = useIconStore.getState();
55
+ if (!store.isConfigured) {
56
+ useIconStore.getState().setConfig(iconNames, iconRenderer);
56
57
  }
58
+ }
57
59
 
60
+ useEffect(() => {
58
61
  if (customColors) {
59
62
  setCustomColors(customColors);
60
63
  }
@@ -70,7 +73,7 @@ export const DesignSystemProvider: React.FC<DesignSystemProviderProps> = ({
70
73
  setIsInitialized(true);
71
74
  onError?.(error);
72
75
  });
73
- }, [initialize, customColors, iconNames, iconRenderer, initialThemeMode, setCustomColors, setGlobalThemeMode, setThemeMode, setIconConfig, onError]);
76
+ }, [initialize, customColors, initialThemeMode, setCustomColors, setGlobalThemeMode, setThemeMode, onError]);
74
77
 
75
78
  useEffect(() => {
76
79
  if (isInitialized && fontsLoaded) {