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

@remirror/react-portals

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/react-portals - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4-ci.1573124774.1

17

lib/dist/react-portals.cjs.js

@@ -13,6 +13,5 @@ 'use strict';

var _slicedToArray = _interopDefault(require('@babel/runtime/helpers/slicedToArray'));
var React = require('react');
var React__default = _interopDefault(React);
var core = require('@emotion/core');
var react = require('react');
var reactDom = require('react-dom');
var core = require('@emotion/core');

@@ -113,3 +112,3 @@ /**

var _useState = React.useState(Array.from(portalContainer.portals.entries())),
var _useState = react.useState(Array.from(portalContainer.portals.entries())),
_useState2 = _slicedToArray(_useState, 2),

@@ -123,10 +122,10 @@ state = _useState2[0],

var onPortalChange = React.useCallback(function (portalMap) {
var onPortalChange = react.useCallback(function (portalMap) {
setState(Array.from(portalMap.entries()));
}, []);
React.useEffect(function () {
react.useEffect(function () {
// Auto disposed when the component un-mounts
return portalContainer.on(onPortalChange);
}, [onPortalChange, portalContainer]);
return core.jsx(React__default.Fragment, null, state.map(function (_ref2) {
return core.jsx(react.Fragment, null, state.map(function (_ref2) {
var _ref3 = _slicedToArray(_ref2, 2),

@@ -138,3 +137,3 @@ container = _ref3[0],

return core.jsx(React.Fragment, {
return core.jsx(react.Fragment, {
key: key

@@ -158,3 +157,3 @@ }, reactDom.createPortal(core.jsx(Portal, {

Component = _ref4.Component;
React.useEffect(function () {
react.useEffect(function () {
/**

@@ -161,0 +160,0 @@ * Remove the portal container entry when this portal is unmounted.

@@ -7,5 +7,5 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';

import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
import React, { useState, useCallback, useEffect, Fragment } from 'react';
import { jsx } from '@emotion/core';
import { useState, useCallback, useEffect, Fragment } from 'react';
import { createPortal } from 'react-dom';
import { jsx } from '@emotion/core';

@@ -122,3 +122,3 @@ /**

}, [onPortalChange, portalContainer]);
return jsx(React.Fragment, null, state.map(function (_ref2) {
return jsx(Fragment, null, state.map(function (_ref2) {
var _ref3 = _slicedToArray(_ref2, 2),

@@ -125,0 +125,0 @@ container = _ref3[0],

@@ -0,1 +1,2 @@

/** @jsx jsx */
import { ReactElement } from 'react';

@@ -2,0 +3,0 @@ import { PortalContainer } from './portal-container';

@@ -6,6 +6,5 @@ 'use strict';

var _slicedToArray = _interopDefault(require('@babel/runtime/helpers/slicedToArray'));
var React = require('react');
var React__default = _interopDefault(React);
var core = require('@emotion/core');
var react = require('react');
var reactDom = require('react-dom');
var core = require('@emotion/core');

@@ -21,3 +20,3 @@ /**

var _useState = React.useState(Array.from(portalContainer.portals.entries())),
var _useState = react.useState(Array.from(portalContainer.portals.entries())),
_useState2 = _slicedToArray(_useState, 2),

@@ -31,10 +30,10 @@ state = _useState2[0],

var onPortalChange = React.useCallback(function (portalMap) {
var onPortalChange = react.useCallback(function (portalMap) {
setState(Array.from(portalMap.entries()));
}, []);
React.useEffect(function () {
react.useEffect(function () {
// Auto disposed when the component un-mounts
return portalContainer.on(onPortalChange);
}, [onPortalChange, portalContainer]);
return core.jsx(React__default.Fragment, null, state.map(function (_ref2) {
return core.jsx(react.Fragment, null, state.map(function (_ref2) {
var _ref3 = _slicedToArray(_ref2, 2),

@@ -46,3 +45,3 @@ container = _ref3[0],

return core.jsx(React.Fragment, {
return core.jsx(react.Fragment, {
key: key

@@ -66,3 +65,3 @@ }, reactDom.createPortal(core.jsx(Portal, {

Component = _ref4.Component;
React.useEffect(function () {
react.useEffect(function () {
/**

@@ -69,0 +68,0 @@ * Remove the portal container entry when this portal is unmounted.

@@ -8,3 +8,3 @@ {

"repository": "https://github.com/ifiokjr/remirror/tree/canary/@remirror/react-portals",
"version": "0.6.3",
"version": "0.6.4-ci.1573124774.1+0ebb5233",
"main": "lib/index.js",

@@ -45,3 +45,3 @@ "module": "lib/dist/react-portals.esm.js",

"sideEffects": false,
"gitHead": "2ce54971bc170ead0310640cbe95630a21a04160"
"gitHead": "0ebb52333284f08a679816394d9b5ce1359da48a"
}

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

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