simpler-state
Advanced tools
Comparing version 1.0.0 to 1.0.1-pre.0
@@ -34,3 +34,4 @@ import { useEntity } from './useEntity'; | ||
// Call the setter so that any bound components are updated | ||
initialValue.then(value => entity.set(value)); | ||
// The `setTimeout` is for preventing race conditions with subscriptions | ||
initialValue.then(value => setTimeout(() => entity.set(value))); | ||
} : () => { | ||
@@ -37,0 +38,0 @@ entity._value = initialValue; |
@@ -18,3 +18,5 @@ export const persistence = (key, options = {}) => { | ||
if (value) { | ||
_promise(deserialize(value)).then(value => entity.set(value)); | ||
_promise(deserialize(value)).then(value => { | ||
setTimeout(() => entity.set(value)); | ||
}); | ||
} | ||
@@ -21,0 +23,0 @@ }); |
@@ -58,4 +58,7 @@ "use strict"; | ||
// Call the setter so that any bound components are updated | ||
// The `setTimeout` is for preventing race conditions with subscriptions | ||
initialValue.then(function (value) { | ||
return entity.set(value); | ||
return setTimeout(function () { | ||
return entity.set(value); | ||
}); | ||
}); | ||
@@ -62,0 +65,0 @@ } : function () { |
@@ -29,3 +29,5 @@ "use strict"; | ||
_promise(deserialize(value)).then(function (value) { | ||
return entity.set(value); | ||
setTimeout(function () { | ||
return entity.set(value); | ||
}); | ||
}); | ||
@@ -32,0 +34,0 @@ } |
{ | ||
"name": "simpler-state", | ||
"version": "1.0.0", | ||
"version": "1.0.1-pre.0", | ||
"description": "The simplest app state management for React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -74,5 +74,5 @@ # <img src="https://simpler-state.js.org/assets/simpler-state-logo.png" alt="SimpleR State" width="240"/> | ||
I have opened a Request For Comments ([here](https://github.com/arnelenero/simpler-state/issues/1)) on GitHub. Your comments and suggestions would be greatly appreciated. | ||
__If you like this library, the concept, and its simplicity, please give it a star ⭐️ on the [GitHub repo](https://github.com/arnelenero/simpler-state) to let me know.__ 😀 | ||
__And if you like this library, the concept, and its simplicity, please give it a star on the [GitHub repo](https://github.com/arnelenero/simpler-state) to let me know.__ 😀 | ||
The RFC (Request For Comments) has ended, but please feel free to open an issue on GitHub for any concerns/questions/suggestions. | ||
@@ -79,0 +79,0 @@ ## Prior Art |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24442
488
1