Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-gateway

Package Overview
Dependencies
Maintainers
9
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gateway - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

2

lib/Gateway.js

@@ -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.8.0",
"description": "Render React DOM into a new context",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -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>
);
}
}
```
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