Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.3 to 5.21.4

6

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

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

12

es/React/render.js

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

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

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

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

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

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

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

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

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

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

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

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

{
"name": "rc-util",
"version": "5.21.3",
"version": "5.21.4",
"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