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

@uiw/react-portal

Package Overview
Dependencies
Maintainers
2
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-portal - npm Package Compare versions

Comparing version 5.0.0-bate-1 to 5.0.0-bate-10

9

cjs/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
Object.defineProperty(exports, "__esModule", {

@@ -10,10 +9,6 @@ value: true

exports["default"] = Portal;
var _react = require("react");
var _reactDom = _interopRequireDefault(require("react-dom"));
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
exports.canUseDOM = canUseDOM;
function Portal(props) {

@@ -31,11 +26,8 @@ var container = props.container;

}, []);
if (!canUseDOM) {
return null;
}
if (!containerRef.current) {
containerRef.current = document.body;
}
if (!defaultNode.current) {

@@ -45,5 +37,4 @@ defaultNode.current = document.createElement('div');

}
return /*#__PURE__*/_reactDom["default"].createPortal(props.children, defaultNode.current);
}
//# sourceMappingURL=index.js.map

4

esm/index.js

@@ -18,11 +18,8 @@ import { useEffect, useRef } from 'react';

}, []);
if (!canUseDOM) {
return null;
}
if (!containerRef.current) {
containerRef.current = document.body;
}
if (!defaultNode.current) {

@@ -32,5 +29,4 @@ defaultNode.current = document.createElement('div');

}
return /*#__PURE__*/ReactDOM.createPortal(props.children, defaultNode.current);
}
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "@uiw/react-portal",
"version": "5.0.0-bate-1",
"version": "5.0.0-bate-10",
"description": "Portal component",

@@ -5,0 +5,0 @@ "author": "Kenny Wong <wowohoo@qq.com>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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