@cripty2001/utils 0.0.149 → 0.0.150

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.
@@ -170,11 +170,11 @@ function useSynced(def, value, setValue) {
170
170
  function useAsync(f, data, debouce = 200) {
171
171
  // Initing reactive input
172
172
  const [input, setInput] = useSafeRef(() => whispr_1.Whispr.create(data ?? (0, _1.getRandomId)()));
173
- if (data !== null) {
174
- (0, react_1.useEffect)(() => {
173
+ (0, react_1.useEffect)(() => {
174
+ if (data !== null) {
175
175
  setInput(data); // Debouncing already handled by dispatcher
176
- }, [data, setInput]);
177
- }
176
+ }
177
+ }, [data, setInput]);
178
178
  // Initing dispatcher
179
179
  const dispatcher = useSafeRef(() => new Dispatcher_1.Dispatcher(input, f, debouce));
180
180
  // Returning dispatcher
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cripty2001/utils",
3
- "version": "0.0.149",
3
+ "version": "0.0.150",
4
4
  "description": "Internal Set of utils. If you need them use them, otherwise go to the next package ;)",
5
5
  "homepage": "https://github.com/cripty2001/utils#readme",
6
6
  "bugs": {