locon 1.4.3 → 1.4.4

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/dist/index.js CHANGED
@@ -114,10 +114,10 @@ function Locon({
114
114
  [getAsset, getAssetByValue, defaultLocale]
115
115
  );
116
116
  (0, import_react.useEffect)(() => {
117
- if (currentLocaleProps && currentLocaleProps !== currentLocale) {
118
- setCurrentLocale(currentLocaleProps);
117
+ if (currentLocaleProps) {
118
+ setCurrentLocale((locale) => locale === currentLocaleProps ? locale : currentLocaleProps);
119
119
  }
120
- }, [currentLocaleProps, currentLocale]);
120
+ }, [currentLocaleProps]);
121
121
  const value = (0, import_react.useMemo)(
122
122
  () => ({
123
123
  assets,
package/dist/index.mjs CHANGED
@@ -76,10 +76,10 @@ function Locon({
76
76
  [getAsset, getAssetByValue, defaultLocale]
77
77
  );
78
78
  useEffect(() => {
79
- if (currentLocaleProps && currentLocaleProps !== currentLocale) {
80
- setCurrentLocale(currentLocaleProps);
79
+ if (currentLocaleProps) {
80
+ setCurrentLocale((locale) => locale === currentLocaleProps ? locale : currentLocaleProps);
81
81
  }
82
- }, [currentLocaleProps, currentLocale]);
82
+ }, [currentLocaleProps]);
83
83
  const value = useMemo(
84
84
  () => ({
85
85
  assets,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locon",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "locon is a simple and lightweight library for React Native that provides a simple way to manage translations in your app.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",