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

react-native-root-siblings

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-root-siblings - npm Package Compare versions

Comparing version

to
4.0.5

8

lib/RootSiblings.js

@@ -50,5 +50,7 @@ import React, { Component } from 'react';

this.siblingsPool = siblings;
this.setState({
siblings
}, () => this.invokeCallback(updateCallback));
setImmediate(() => {
this.setState({
siblings
}, () => this.invokeCallback(updateCallback));
});
});

@@ -55,0 +57,0 @@ }

@@ -47,3 +47,13 @@ import React, { useEffect, useState } from 'react';

const { inactive } = props;
const [sibling, setSibling] = useState(null);
const [sibling] = useState(() => {
const { Root: Parent, manager: parentManager } = wrapRootComponent(ChildrenWrapper, renderSibling);
managerStack.push(parentManager);
if (inactive) {
inactiveManagers.add(parentManager);
}
return {
Root: Parent,
manager: parentManager
};
});
useEffect(() => {

@@ -65,27 +75,8 @@ return () => {

}
if (!sibling) {
const { Root: Parent, manager: parentManager } = wrapRootComponent(ChildrenWrapper, renderSibling);
managerStack.push(parentManager);
if (inactive) {
inactiveManagers.add(parentManager);
}
setSibling({
Root: Parent,
manager: parentManager
});
return <Parent>{props.children}</Parent>;
}
else {
const Parent = sibling.Root;
return <Parent>{props.children}</Parent>;
}
const Parent = sibling.Root;
return <Parent>{props.children}</Parent>;
}
export function RootSiblingPortal(props) {
const [sibling, setSibling] = useState(null);
if (!sibling) {
setSibling(new RootSiblingsManager(props.children));
}
else {
sibling.update(props.children);
}
const [sibling] = useState(() => new RootSiblingsManager(null));
sibling.update(props.children);
useEffect(() => {

@@ -92,0 +83,0 @@ if (sibling) {

{
"version": "4.0.4",
"version": "4.0.5",
"name": "react-native-root-siblings",

@@ -4,0 +4,0 @@ "repository": {

@@ -82,3 +82,3 @@ ## react-native-root-siblings [![npm version](https://badge.fury.io/js/react-native-root-siblings.svg)](http://badge.fury.io/js/react-native-root-siblings)

<RootSiblingPortal>
<View style={[StyleSheet.absoluteFull, { backgroundColor: 'rgba(0, 0, 0, 0.25)' }]} />
<View style={[StyleSheet.absoluteFill, { backgroundColor: 'rgba(0, 0, 0, 0.25)' }]} />
</RootSiblingPortal>

@@ -85,0 +85,0 @@ )

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