react-native-root-siblings
Advanced tools
Comparing version 3.1.7 to 3.1.8
40
index.js
@@ -1,5 +0,5 @@ | ||
import React, { Component } from 'react'; | ||
import { StyleSheet, View, AppRegistry } from 'react-native'; | ||
import StaticContainer from 'static-container'; | ||
import PropTypes from 'prop-types'; | ||
import React, { Component } from "react"; | ||
import { StyleSheet, View, AppRegistry } from "react-native"; | ||
import StaticContainer from "static-container"; | ||
import PropTypes from "prop-types"; | ||
@@ -17,4 +17,4 @@ const styles = StyleSheet.create({ | ||
dispatch: PropTypes.func.isRequired, | ||
getState: PropTypes.func.isRequired, | ||
}), | ||
getState: PropTypes.func.isRequired | ||
}) | ||
}; | ||
@@ -31,12 +31,15 @@ | ||
AppRegistry.setWrapperComponentProvider(function() { | ||
return function RootSiblingsWrapper(props) { | ||
return ( | ||
<View style={styles.container}> | ||
{props.children} | ||
<RootSiblings /> | ||
</View> | ||
); | ||
}; | ||
}); | ||
if (!global.__rootSiblingsInjected) { | ||
AppRegistry.setWrapperComponentProvider(function() { | ||
return function RootSiblingsWrapper(props) { | ||
return ( | ||
<View style={styles.container}> | ||
{props.children} | ||
<RootSiblings /> | ||
</View> | ||
); | ||
}; | ||
}); | ||
global.__rootSiblingsInjected = true; | ||
} | ||
@@ -84,3 +87,6 @@ let uuid = 0; | ||
const sibling = ( | ||
<StaticContainer key={`root-sibling-${key}`} shouldUpdate={!!this._updatedSiblings[key]}> | ||
<StaticContainer | ||
key={`root-sibling-${key}`} | ||
shouldUpdate={!!this._updatedSiblings[key]} | ||
> | ||
{element} | ||
@@ -87,0 +93,0 @@ </StaticContainer> |
{ | ||
"version": "3.1.7", | ||
"version": "3.1.8", | ||
"name": "react-native-root-siblings", | ||
@@ -4,0 +4,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121
9593
7