@yaasl/core 0.13.0-alpha.2 → 0.13.0-alpha.3

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.
@@ -79,9 +79,9 @@ exports.indexedDb = (0, create_effect_1.createEffect)(({ atom, options }) => {
79
79
  yield atomDb.set(key, atom.defaultValue);
80
80
  }
81
81
  }),
82
- set: (_a) => __awaiter(void 0, [_a], void 0, function* ({ value }) {
83
- yield (atomDb === null || atomDb === void 0 ? void 0 : atomDb.set(key, value));
84
- pushSync === null || pushSync === void 0 ? void 0 : pushSync();
85
- }),
82
+ set: ({ value }) => {
83
+ // don't wait to set the atom value,directly pass it into the atom
84
+ void (atomDb === null || atomDb === void 0 ? void 0 : atomDb.set(key, value).then(pushSync));
85
+ },
86
86
  };
87
87
  });
@@ -63,9 +63,9 @@ export const indexedDb = createEffect(({ atom, options }) => {
63
63
  await atomDb.set(key, atom.defaultValue);
64
64
  }
65
65
  },
66
- set: async ({ value }) => {
67
- await atomDb?.set(key, value);
68
- pushSync?.();
66
+ set: ({ value }) => {
67
+ // don't wait to set the atom value,directly pass it into the atom
68
+ void atomDb?.set(key, value).then(pushSync);
69
69
  },
70
70
  };
71
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaasl/core",
3
- "version": "0.13.0-alpha.2",
3
+ "version": "0.13.0-alpha.3",
4
4
  "description": "yet another atomic store library (vanilla-js)",
5
5
  "author": "PrettyCoffee",
6
6
  "license": "MIT",