@wixc3/react-board
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -16,9 +16,16 @@ "use strict"; | ||
reactRootByContainer.set(container, reactRoot); | ||
await new Promise((resolve, reject) => { | ||
reactRoot === null || reactRoot === void 0 ? void 0 : reactRoot.render(react_1.default.createElement(ErrorBoundary, { onRender: resolve, reportError: reject }, element)); | ||
}); | ||
return () => { | ||
const cleanup = () => { | ||
reactRoot === null || reactRoot === void 0 ? void 0 : reactRoot.unmount(); | ||
reactRootByContainer.delete(container); | ||
}; | ||
try { | ||
await new Promise((resolve, reject) => { | ||
reactRoot === null || reactRoot === void 0 ? void 0 : reactRoot.render(react_1.default.createElement(ErrorBoundary, { onRender: resolve, reportError: reject }, element)); | ||
}); | ||
} | ||
catch (e) { | ||
cleanup(); | ||
throw e; | ||
} | ||
return cleanup; | ||
} | ||
@@ -61,7 +68,11 @@ else { | ||
var _a, _b; | ||
(_b = (_a = this.props).onRender) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
if (!this.state.hasError) { | ||
(_b = (_a = this.props).onRender) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
} | ||
} | ||
componentDidUpdate() { | ||
var _a, _b; | ||
(_b = (_a = this.props).onRender) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
if (!this.state.hasError) { | ||
(_b = (_a = this.props).onRender) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
} | ||
} | ||
@@ -68,0 +79,0 @@ render() { |
{ | ||
"name": "@wixc3/react-board", | ||
"description": "Library for creation of React component boards", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"main": "dist/index.js", | ||
@@ -11,3 +11,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@wixc3/board-core": "^2.2.0" | ||
"@wixc3/board-core": "^2.2.1" | ||
}, | ||
@@ -14,0 +14,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
19061
281
Updated@wixc3/board-core@^2.2.1