@modern-js-reduck/react
Advanced tools
Comparing version 1.0.0-rc.10 to 1.0.0-rc.11
# @modern-js-reduck/react | ||
## 1.0.0-rc.10 | ||
### Patch Changes | ||
- a7bd932: release: rc.7 | ||
- 26d5144: fix(type): actions can return void | ||
- 9452589: fix: ts type | ||
- a7bd932: fix: use model State type | ||
- feat: useLocalModel support | ||
- a7bd932: fix: model type | ||
- a7bd932: fix: model<State> when State passed use State | ||
- Updated dependencies [a7bd932] | ||
- Updated dependencies [26d5144] | ||
- Updated dependencies [9452589] | ||
- Updated dependencies [a7bd932] | ||
- Updated dependencies [undefined] | ||
- Updated dependencies [a7bd932] | ||
- Updated dependencies [a7bd932] | ||
- @modern-js-reduck/store@1.0.0-rc.10 | ||
## 1.0.0-rc.9 | ||
@@ -24,0 +4,0 @@ |
@@ -26,2 +26,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
const createApp = config => { | ||
let configFromProvider = null; | ||
const Context = /*#__PURE__*/createContext(null); | ||
@@ -37,2 +38,3 @@ | ||
const batchManager = createBatchManager(store); | ||
configFromProvider = _config; | ||
return /*#__PURE__*/_jsx(Context.Provider, { | ||
@@ -109,6 +111,7 @@ value: { | ||
const [store, batchManager] = useMemo(() => { | ||
const finalConfig = configFromProvider || config; | ||
const localStoreConfig = { | ||
enhanders: (config === null || config === void 0 ? void 0 : config.enhancers) || [], | ||
middlewares: (config === null || config === void 0 ? void 0 : config.middlewares) || [], | ||
plugins: config === null || config === void 0 ? void 0 : config.plugins | ||
enhanders: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.enhancers) || [], | ||
middlewares: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.middlewares) || [], | ||
plugins: finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.plugins | ||
}; | ||
@@ -115,0 +118,0 @@ const reuckStore = createStore(localStoreConfig); |
@@ -39,2 +39,3 @@ "use strict"; | ||
const createApp = config => { | ||
let configFromProvider = null; | ||
const Context = /*#__PURE__*/(0, _react.createContext)(null); | ||
@@ -50,2 +51,3 @@ | ||
const batchManager = (0, _batchManager.createBatchManager)(store); | ||
configFromProvider = _config; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, { | ||
@@ -122,6 +124,7 @@ value: { | ||
const [store, batchManager] = (0, _react.useMemo)(() => { | ||
const finalConfig = configFromProvider || config; | ||
const localStoreConfig = { | ||
enhanders: (config === null || config === void 0 ? void 0 : config.enhancers) || [], | ||
middlewares: (config === null || config === void 0 ? void 0 : config.middlewares) || [], | ||
plugins: config === null || config === void 0 ? void 0 : config.plugins | ||
enhanders: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.enhancers) || [], | ||
middlewares: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.middlewares) || [], | ||
plugins: finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.plugins | ||
}; | ||
@@ -128,0 +131,0 @@ const reuckStore = (0, _store.createStore)(localStoreConfig); |
@@ -40,2 +40,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
var createApp = function createApp(config) { | ||
var configFromProvider = null; | ||
var Context = /*#__PURE__*/createContext(null); | ||
@@ -49,2 +50,3 @@ | ||
var batchManager = createBatchManager(store); | ||
configFromProvider = _config; | ||
return /*#__PURE__*/_jsx(Context.Provider, { | ||
@@ -148,6 +150,7 @@ value: { | ||
var _useMemo3 = useMemo(function () { | ||
var finalConfig = configFromProvider || config; | ||
var localStoreConfig = { | ||
enhanders: (config === null || config === void 0 ? void 0 : config.enhancers) || [], | ||
middlewares: (config === null || config === void 0 ? void 0 : config.middlewares) || [], | ||
plugins: config === null || config === void 0 ? void 0 : config.plugins | ||
enhanders: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.enhancers) || [], | ||
middlewares: (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.middlewares) || [], | ||
plugins: finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.plugins | ||
}; | ||
@@ -154,0 +157,0 @@ var reuckStore = createStore(localStoreConfig); |
110
package.json
{ | ||
"name": "@modern-js-reduck/react", | ||
"version": "1.0.0-rc.10", | ||
"jsnext:source": "./src/index.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"main": "./dist/js/node/index.js", | ||
"module": "./dist/js/treeshaking/index.js", | ||
"jsnext:modern": "./dist/js/modern/index.js", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"import": "./dist/js/modern/index.js", | ||
"require": "./dist/js/node/index.js" | ||
}, | ||
"default": "./dist/js/treeshaking/index.js" | ||
} | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7", | ||
"@modern-js-reduck/store": "^1.0.0-rc.10", | ||
"invariant": "^2.2.4" | ||
}, | ||
"devDependencies": { | ||
"@modern-js/module-tools": "^1.0.0-rc.1", | ||
"@modern-js/plugin-testing": "^1.0.0-rc.1", | ||
"@testing-library/jest-dom": "^5.14.1", | ||
"@testing-library/react": "^12.0.0", | ||
"@types/invariant": "^2.2.34", | ||
"@types/jest": "^26", | ||
"@types/node": "^14", | ||
"@types/react": "^17", | ||
"@types/react-dom": "^17", | ||
"@types/testing-library__jest-dom": "^5.14.1", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"redux": "^4.1.1", | ||
"typescript": "^4" | ||
}, | ||
"modernSettings": {}, | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"react": "^17.0.2" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"url": "https://github.com/modern-js-dev/reduck" | ||
}, | ||
"scripts": { | ||
"new": "modern new", | ||
"build": "modern build", | ||
"test": "modern test" | ||
} | ||
"name": "@modern-js-reduck/react", | ||
"version": "1.0.0-rc.11", | ||
"jsnext:source": "./src/index.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"main": "./dist/js/node/index.js", | ||
"module": "./dist/js/treeshaking/index.js", | ||
"jsnext:modern": "./dist/js/modern/index.js", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"import": "./dist/js/modern/index.js", | ||
"require": "./dist/js/node/index.js" | ||
}, | ||
"default": "./dist/js/treeshaking/index.js" | ||
} | ||
}, | ||
"scripts": { | ||
"prepare": "pnpm build", | ||
"prepublishOnly": "pnpm build --platform", | ||
"new": "modern new", | ||
"build": "modern build", | ||
"test": "modern test" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7", | ||
"@modern-js-reduck/store": "^1.0.0-rc.9", | ||
"invariant": "^2.2.4" | ||
}, | ||
"devDependencies": { | ||
"@modern-js/module-tools": "^1.0.0-rc.1", | ||
"@modern-js/plugin-testing": "^1.0.0-rc.1", | ||
"@testing-library/jest-dom": "^5.14.1", | ||
"@testing-library/react": "^12.0.0", | ||
"@types/invariant": "^2.2.34", | ||
"@types/jest": "^26", | ||
"@types/node": "^14", | ||
"@types/react": "^17", | ||
"@types/react-dom": "^17", | ||
"@types/testing-library__jest-dom": "^5.14.1", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"redux": "^4.1.1", | ||
"typescript": "^4" | ||
}, | ||
"modernSettings": {}, | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"react": "^17.0.2" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"url": "https://github.com/modern-js-dev/reduck" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
89991
2102