@umituz/react-native-settings 4.2.0 → 4.3.0

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-settings",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -25,6 +25,11 @@ export interface SettingsStackNavigatorProps {
25
25
  */
26
26
  config?: SettingsConfig;
27
27
 
28
+ /**
29
+ * App version number from app config (e.g., "1.0.0")
30
+ */
31
+ appVersion?: string;
32
+
28
33
  /**
29
34
  * Additional screens to register
30
35
  * Apps can add their own screens here
@@ -40,6 +45,7 @@ const Stack = createStackNavigator<SettingsStackParamList>();
40
45
 
41
46
  export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
42
47
  config = {},
48
+ appVersion,
43
49
  additionalScreens = [],
44
50
  }) => {
45
51
  const tokens = useAppDesignTokens();
@@ -60,10 +66,10 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
60
66
 
61
67
  // Memoize SettingsScreen wrapper to prevent remounting on every render
62
68
  const SettingsScreenWrapper = React.useMemo(() => {
63
- const Wrapper = () => <SettingsScreen config={config} />;
69
+ const Wrapper = () => <SettingsScreen config={config} appVersion={appVersion} />;
64
70
  Wrapper.displayName = "SettingsScreenWrapper";
65
71
  return Wrapper;
66
- }, [config]);
72
+ }, [config, appVersion]);
67
73
 
68
74
  return (
69
75
  <Stack.Navigator screenOptions={screenOptions}>