react-app-store-manager 1.2.2 → 1.3.0
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 +1 -3
- package/package.json +2 -5
package/dist/index.js
CHANGED
@@ -59,9 +59,7 @@ var Store = /** @class */ (function () {
|
|
59
59
|
exports.Store = Store;
|
60
60
|
function useStore(store) {
|
61
61
|
var _a = (0, react_1.useState)(true), change = _a[0], setChange = _a[1];
|
62
|
-
var
|
63
|
-
changeRef.current = change;
|
64
|
-
var onChange = function () { return setChange(!changeRef.current); };
|
62
|
+
var onChange = function () { return setChange(function (state) { return !state; }); };
|
65
63
|
(0, react_1.useEffect)(function () {
|
66
64
|
store.addListener(onChange);
|
67
65
|
return function () { return store.removeListener(onChange); };
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-app-store-manager",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.3.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"scripts": {
|
8
8
|
"build": "tsc",
|
9
|
-
"
|
9
|
+
"publish": "npm publish"
|
10
10
|
},
|
11
11
|
"files": [
|
12
12
|
"dist/"
|
@@ -18,11 +18,8 @@
|
|
18
18
|
"@testing-library/react": "^13.3.0",
|
19
19
|
"@testing-library/user-event": "^14.2.1",
|
20
20
|
"@types/node": "^18.0.0",
|
21
|
-
"@types/react-dom": "^18.0.5",
|
22
21
|
"jest": "^28.1.1",
|
23
22
|
"react": "^18.2.0",
|
24
|
-
"react-dom": "^18.2.0",
|
25
|
-
"react-scripts": "^5.0.1",
|
26
23
|
"ts-jest": "^28.0.5"
|
27
24
|
},
|
28
25
|
"devDependencies": {
|