@yaasl/react 0.11.0 → 0.12.1
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/@types/index.d.ts +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/{useAtom.js → use-atom.js} +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/{useAtom.js → use-atom.js} +1 -1
- package/package.json +5 -5
- /package/dist/@types/{useAtom.d.ts → use-atom.d.ts} +0 -0
- /package/dist/@types/{useStateful.d.ts → use-stateful.d.ts} +0 -0
- /package/dist/cjs/{useStateful.js → use-stateful.js} +0 -0
- /package/dist/esm/{useStateful.js → use-stateful.js} +0 -0
package/dist/@types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useAtom, useSetAtom, useAtomValue, useAtomDidInit } from "./
|
|
1
|
+
export { useAtom, useSetAtom, useAtomValue, useAtomDidInit } from "./use-atom";
|
|
2
2
|
export * from "@yaasl/core";
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.useAtomDidInit = exports.useAtomValue = exports.useSetAtom = exports.useAtom = void 0;
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "useAtom", { enumerable: true, get: function () { return
|
|
20
|
-
Object.defineProperty(exports, "useSetAtom", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "useAtomValue", { enumerable: true, get: function () { return
|
|
22
|
-
Object.defineProperty(exports, "useAtomDidInit", { enumerable: true, get: function () { return
|
|
18
|
+
var use_atom_1 = require("./use-atom");
|
|
19
|
+
Object.defineProperty(exports, "useAtom", { enumerable: true, get: function () { return use_atom_1.useAtom; } });
|
|
20
|
+
Object.defineProperty(exports, "useSetAtom", { enumerable: true, get: function () { return use_atom_1.useSetAtom; } });
|
|
21
|
+
Object.defineProperty(exports, "useAtomValue", { enumerable: true, get: function () { return use_atom_1.useAtomValue; } });
|
|
22
|
+
Object.defineProperty(exports, "useAtomDidInit", { enumerable: true, get: function () { return use_atom_1.useAtomDidInit; } });
|
|
23
23
|
__exportStar(require("@yaasl/core"), exports);
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useAtom = exports.useAtomDidInit = exports.useSetAtom = exports.useAtomValue = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const use_stateful_1 = require("./use-stateful");
|
|
6
6
|
/** Use an atom's value in the React lifecycle.
|
|
7
7
|
*
|
|
8
8
|
* @param atom Atom to be used.
|
|
9
9
|
*
|
|
10
10
|
* @returns The atom's value.
|
|
11
11
|
**/
|
|
12
|
-
const useAtomValue = (atom) => (0,
|
|
12
|
+
const useAtomValue = (atom) => (0, use_stateful_1.useStatefulValue)(atom);
|
|
13
13
|
exports.useAtomValue = useAtomValue;
|
|
14
14
|
/** Set an atom's value in the React lifecycle.
|
|
15
15
|
*
|
|
@@ -17,7 +17,7 @@ exports.useAtomValue = useAtomValue;
|
|
|
17
17
|
*
|
|
18
18
|
* @returns A setter function for the atom.
|
|
19
19
|
**/
|
|
20
|
-
const useSetAtom = (atom) => (0,
|
|
20
|
+
const useSetAtom = (atom) => (0, use_stateful_1.useSetStateful)(atom);
|
|
21
21
|
exports.useSetAtom = useSetAtom;
|
|
22
22
|
/** Use an atom's initialization state in the React lifecycle.
|
|
23
23
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useAtom, useSetAtom, useAtomValue, useAtomDidInit } from "./
|
|
1
|
+
export { useAtom, useSetAtom, useAtomValue, useAtomDidInit } from "./use-atom";
|
|
2
2
|
export * from "@yaasl/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yaasl/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "yet another atomic store library (react)",
|
|
5
5
|
"author": "PrettyCoffee",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"react": "^18.0.0 || ^19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@yaasl/core": "0.
|
|
47
|
-
"@yaasl/utils": "0.
|
|
46
|
+
"@yaasl/core": "^0.12.1",
|
|
47
|
+
"@yaasl/utils": "^0.12.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@testing-library/react": "^16.
|
|
51
|
-
"@types/react": "^18.3.
|
|
50
|
+
"@testing-library/react": "^16.3.0",
|
|
51
|
+
"@types/react": "^18.3.23",
|
|
52
52
|
"react-dom": "^18.3.1",
|
|
53
53
|
"react": "^18.3.1"
|
|
54
54
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|