Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 3.1.7 to 3.2.0

32

index.js

@@ -43,2 +43,3 @@ import React, { Component } from 'react';

const triggers = [];
const pendingSiblings = {};
class RootSiblings extends Component {

@@ -49,6 +50,11 @@ _updatedSiblings = {};

constructor(props) {
super(props);
this._siblings = {};
componentDidMount() {
triggers.push(this._update);
Object.keys(pendingSiblings).forEach((id) => {
const sibling = pendingSiblings[id];
if (sibling) {
this._update(id, ...sibling);
delete pendingSiblings[id];
}
});
}

@@ -110,11 +116,19 @@

function update(element, callback, store) {
triggers.forEach(function(trigger) {
trigger(id, element, callback, store);
});
if (triggers.length) {
triggers.forEach(function(trigger) {
trigger(id, element, callback, store);
});
} else {
pendingSiblings[id] = [element, callback, store];
}
}
function destroy(callback) {
triggers.forEach(function(trigger) {
trigger(id, null, callback);
});
if (pendingSiblings[id]) {
delete pendingSiblings[id];
} else {
triggers.forEach(function(trigger) {
trigger(id, null, callback);
});
}
}

@@ -121,0 +135,0 @@

{
"version": "3.1.7",
"version": "3.2.0",
"name": "react-native-root-siblings",

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

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