Socket
Socket
Sign inDemoInstall

rc-util

Package Overview
Dependencies
Maintainers
8
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-util - npm Package Compare versions

Comparing version 5.21.2 to 5.21.3

2

es/Dom/addEventListener.js

@@ -15,3 +15,3 @@ import ReactDOM from 'react-dom';

if (target.removeEventListener) {
target.removeEventListener(eventType, callback);
target.removeEventListener(eventType, callback, option);
}

@@ -18,0 +18,0 @@ }

import type * as React from 'react';
import type { Root } from 'react-dom/client';
declare const MARK = "__rc_react_root__";
declare type ContainerType = (Element | DocumentFragment) & {
[MARK]?: Root;
};
declare type ContainerType = Element | DocumentFragment;
/** @private Test usage. Not work in prod */

@@ -8,0 +4,0 @@ export declare function _r(node: React.ReactElement, container: ContainerType): void;

@@ -31,10 +31,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

var MARK = '__rc_react_root__';
var containerRoots = new Map();
function modernRender(node, container) {
toggleWarning(true);
var root = container[MARK] || createRoot(container);
var root = containerRoots.get(container) || createRoot(container);
toggleWarning(false);
root.render(node);
container[MARK] = root;
containerRoots.set(container, root);
}

@@ -73,6 +73,6 @@

return _context.abrupt("return", Promise.resolve().then(function () {
var _container$MARK;
var _containerRoots$get;
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
delete container[MARK];
(_containerRoots$get = containerRoots.get(container)) === null || _containerRoots$get === void 0 ? void 0 : _containerRoots$get.unmount();
containerRoots.delete(container);
}));

@@ -79,0 +79,0 @@

@@ -25,3 +25,3 @@ "use strict";

if (target.removeEventListener) {
target.removeEventListener(eventType, callback);
target.removeEventListener(eventType, callback, option);
}

@@ -28,0 +28,0 @@ }

import type * as React from 'react';
import type { Root } from 'react-dom/client';
declare const MARK = "__rc_react_root__";
declare type ContainerType = (Element | DocumentFragment) & {
[MARK]?: Root;
};
declare type ContainerType = Element | DocumentFragment;
/** @private Test usage. Not work in prod */

@@ -8,0 +4,0 @@ export declare function _r(node: React.ReactElement, container: ContainerType): void;

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

var MARK = '__rc_react_root__';
var containerRoots = new Map();
function modernRender(node, container) {
toggleWarning(true);
var root = container[MARK] || createRoot(container);
var root = containerRoots.get(container) || createRoot(container);
toggleWarning(false);
root.render(node);
container[MARK] = root;
containerRoots.set(container, root);
}

@@ -93,6 +93,6 @@

return _context.abrupt("return", Promise.resolve().then(function () {
var _container$MARK;
var _containerRoots$get;
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
delete container[MARK];
(_containerRoots$get = containerRoots.get(container)) === null || _containerRoots$get === void 0 ? void 0 : _containerRoots$get.unmount();
containerRoots.delete(container);
}));

@@ -99,0 +99,0 @@

{
"name": "rc-util",
"version": "5.21.2",
"version": "5.21.3",
"description": "Common Utils For React Component",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc