react-gateway
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -67,4 +67,4 @@ 'use strict'; | ||
into: _propTypes2.default.string.isRequired, | ||
children: _propTypes2.default.oneOfType([_propTypes2.default.element, _propTypes2.default.string]) | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = Gateway; |
@@ -38,3 +38,3 @@ 'use strict'; | ||
_this.state = { | ||
child: null | ||
children: null | ||
}; | ||
@@ -41,0 +41,0 @@ |
{ | ||
"name": "react-gateway", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Render React DOM into a new context", | ||
@@ -26,3 +26,2 @@ "main": "lib/index.js", | ||
"prop-types": "^15.5.0", | ||
"react": "^0.14.2 || ^15.0.0-0", | ||
"react-prop-types": "^0.4.0" | ||
@@ -57,4 +56,8 @@ }, | ||
"react-addons-test-utils": "^15.0.0-0", | ||
"react": "^15.0.0-0", | ||
"react-dom": "^15.0.0-0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0" | ||
} | ||
} |
@@ -9,3 +9,4 @@ # React Gateway | ||
It also works in universal (isomorphic) React applications without any | ||
additional setup. | ||
additional setup and in React Native applications | ||
[when used correctly](#react-native-example). | ||
@@ -172,1 +173,40 @@ ## Installation | ||
update its internal registry and ensure things are properly rendered. | ||
## React Native example | ||
React Gateway does not directly depend on `react-dom`, so it works fine with | ||
React Native under one condition: | ||
**You must pass React Native component like `View` or similar to | ||
`component` prop of `<GatewayDest>`.** | ||
Because if you don't, `<GatewayDest>` will try to render `div` element, which | ||
is not available. | ||
```js | ||
import React from 'react'; | ||
import { Text, View } from 'react-native'; | ||
import { | ||
Gateway, | ||
GatewayDest, | ||
GatewayProvider | ||
} from 'react-gateway'; | ||
export default class Application extends React.Component { | ||
render() { | ||
return ( | ||
<GatewayProvider> | ||
<View> | ||
<Text>React Gateway Native Example</Text> | ||
<View> | ||
<Gateway into="one"> | ||
<Text>Text rendered elsewhere</Text> | ||
</Gateway> | ||
</View> | ||
<GatewayDest name="one" component={View} /> | ||
</View> | ||
</GatewayProvider> | ||
); | ||
} | ||
} | ||
``` |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
19966
211
0
28
10
+ Addedreact@16.14.0(transitive)
- Removedreact@^0.14.2 || ^15.0.0-0
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact@15.7.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedua-parser-js@0.7.40(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)