🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@wixc3/react-board

Package Overview
Dependencies
Maintainers
84
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/react-board - npm Package Compare versions

Comparing version

to
2.1.2

17

dist/react-error-handled-render.js

@@ -10,10 +10,15 @@ "use strict";

const client_1 = __importDefault(require("react-dom/client"));
const reactRootByContainer = new WeakMap();
const reactErrorHandledRendering = async (element, container) => {
if (client_1.default.createRoot) {
// react 18+
const reactRoot = client_1.default.createRoot(container);
const reactRoot = reactRootByContainer.get(container) || client_1.default.createRoot(container);
reactRootByContainer.set(container, reactRoot);
await new Promise((resolve, reject) => {
reactRoot.render(react_1.default.createElement(ErrorBoundary, { onMount: resolve, reportError: reject }, element));
reactRoot === null || reactRoot === void 0 ? void 0 : reactRoot.render(react_1.default.createElement(ErrorBoundary, { onRender: resolve, reportError: reject }, element));
});
return () => reactRoot.unmount();
return () => {
reactRoot === null || reactRoot === void 0 ? void 0 : reactRoot.unmount();
reactRootByContainer.delete(container);
};
}

@@ -43,4 +48,8 @@ else {

var _a, _b;
(_b = (_a = this.props).onMount) === null || _b === void 0 ? void 0 : _b.call(_a);
(_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);
}
render() {

@@ -47,0 +56,0 @@ return this.state.hasError ? null : this.props.children;

{
"name": "@wixc3/react-board",
"description": "Library for creation of React component boards",
"version": "2.0.5",
"version": "2.1.2",
"main": "dist/index.js",

@@ -11,3 +11,3 @@ "peerDependencies": {

"dependencies": {
"@wixc3/board-core": "^2.0.5"
"@wixc3/board-core": "^2.1.2"
},

@@ -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