@swear-js/react
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -20,2 +20,3 @@ "use strict"; | ||
var core_1 = require("@swear-js/core"); | ||
var default_actions_1 = require("./default-actions"); | ||
exports.swearContext = react_1.default.createContext((0, core_1.createStore)()); | ||
@@ -40,3 +41,6 @@ var useSwear = function (_a) { | ||
return (__assign(__assign({}, acc), (_b = {}, _b[actionType] = reducer(function (payload) { return (store === null || store === void 0 ? void 0 : store.setSwearValue(swearId, actionType, payload)); }), _b))); | ||
}, {}); | ||
}, { | ||
set: (0, default_actions_1.set)(function (payload) { return (store === null || store === void 0 ? void 0 : store.setSwearValue(swearId, 'set', payload)); }), | ||
reset: (0, default_actions_1.reset)(defaultState)(function (payload) { return (store === null || store === void 0 ? void 0 : store.setSwearValue(swearId, 'reset', payload)); }), | ||
}); | ||
return [swearValue, actionsWrapped]; | ||
@@ -43,0 +47,0 @@ }; |
{ | ||
"name": "@swear-js/react", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "React support for swear-js", | ||
@@ -31,3 +31,3 @@ "repository": { | ||
"dependencies": { | ||
"@swear-js/core": "^1.1.6", | ||
"@swear-js/core": "^1.1.7", | ||
"@types/node": "^17.0.24", | ||
@@ -51,3 +51,3 @@ "@types/react": "^18.0.5", | ||
}, | ||
"gitHead": "6d8d95d25fb2a3875d6467b6aaeff3073e31652c" | ||
"gitHead": "4fa0eaab6f4968796019dd172a87697b01b41db5" | ||
} |
@@ -11,2 +11,8 @@ # 🍭 Swear JS | ||
### Demo | ||
Demo application is runnable via npx: | ||
- [React] `$ npx swear-demo-react` | ||
> Don't forget to remove created project directory after | ||
## Installation | ||
@@ -13,0 +19,0 @@ ``` |
Sorry, the diff of this file is not supported yet
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
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
12184
23
121
83
Updated@swear-js/core@^1.1.7