react-native-root-siblings
Advanced tools
Comparing version 4.0.6 to 4.1.0
import React, { Component } from 'react'; | ||
import StaticContainer from 'static-container'; | ||
import StaticContainer from './StaticContainer'; | ||
import { RootControllerChanges } from './RootController'; | ||
@@ -4,0 +4,0 @@ export default class extends Component { |
{ | ||
"version": "4.0.6", | ||
"version": "4.1.0", | ||
"name": "react-native-root-siblings", | ||
@@ -12,5 +12,4 @@ "repository": { | ||
"scripts": { | ||
"lint": "npx tslint ./src/* --fix", | ||
"lint": "npx tsc --noEmit && npx eslint \"./src/**/*.@(ts|tsx)\" --fix", | ||
"test": "echo no tests", | ||
"precommit": "lint-staged", | ||
"build": "npx tsc", | ||
@@ -20,3 +19,3 @@ "prepublishOnly": "npm run build" | ||
"lint-staged": { | ||
"*.ts": [ | ||
"./src/**/*.{ts,tsx}": [ | ||
"npm run lint", | ||
@@ -26,16 +25,19 @@ "git add" | ||
}, | ||
"dependencies": { | ||
"static-container": "^1.5.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.9.2", | ||
"@types/react-native": "^0.60.14", | ||
"husky": "^3.0.5", | ||
"lint-staged": "^9.2.1", | ||
"np": "^5.1.0", | ||
"prettier": "^1.18.2", | ||
"typescript": "^3.6.3", | ||
"tslint": "5.10.0", | ||
"tslint-config-prettier": "1.18.0", | ||
"tslint-plugin-prettier": "^2.0.1" | ||
"@types/react": "^17.0", | ||
"@types/react-native": "^0.63", | ||
"@typescript-eslint/eslint-plugin": "^2.6.1", | ||
"@typescript-eslint/parser": "^2.6.1", | ||
"eslint": "^6.7.2", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-plugin-import": "^2.19.1", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-react": "^7.17.0", | ||
"eslint-plugin-react-hooks": "^2.3.0", | ||
"eslint-plugin-react-native": "^3.8.1", | ||
"husky": "^3.1.0", | ||
"lint-staged": "^9.5.0", | ||
"np": "^5.2.1", | ||
"prettier": "^1.19.1", | ||
"typescript": "^3.7.3" | ||
}, | ||
@@ -48,3 +50,8 @@ "keywords": [ | ||
"android" | ||
] | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
} |
@@ -12,2 +12,21 @@ ## 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) | ||
## For react native >= 0.62 | ||
The [new LogBox component](https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/ReactNative/AppRegistry.js#L298-L309) would impact this component's initialization. To make it work we have to explicitly insert a mount point in your app like this: | ||
``` | ||
// in your entry file like `App.js` | ||
import { RootSiblingParent } from 'react-native-root-siblings'; | ||
// in your render function | ||
return ( | ||
<RootSiblingParent> // <- use RootSiblingParent to wrap your root component | ||
<App /> | ||
</RootSiblingParent> | ||
); | ||
``` | ||
You can skip this step if your react-native is lower than 0.62. And actually you can inject RootSiblingParent into anywhere like a react portal, for example if you have multiple rootviews you can choose which one to hold the root siblings. | ||
## 4.x | ||
@@ -14,0 +33,0 @@ From 4.0 the redux store context injection is not enabled by default, the redux store context should be set by a context wrapper. |
/* tslint:disable */ | ||
declare module NodeJS { | ||
declare module NodeJS { | ||
interface Global { | ||
@@ -4,0 +4,0 @@ __rootSiblingsInjected: boolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
40921
0
35
741
217
16
- Removedstatic-container@^1.5.1
- Removedstatic-container@1.7.1(transitive)