Socket
Socket
Sign inDemoInstall

react-teleport

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-teleport - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

.idea/.name

22

package.json

@@ -6,4 +6,4 @@ {

"repository" : "https://github.com/coma/react-teleport",
"main" : "./index.js",
"version" : "0.0.0",
"main" : "./src/index.js",
"version" : "0.1.0",
"license" : "MIT",

@@ -14,11 +14,13 @@ "private" : false,

],
"keywords" : ["react"],
"keywords" : [
"react"
],
"dependencies" : {
"react": "0.13"
},
"devDependencies": {
"jsdom" : "5.4",
"mocha" : "2.2",
"should" : "7.0",
"eslint" : "0.24",
"eslint-plugin-react": "2.5"
"jsdom" : "5.4",
"mocha" : "2.2",
"should": "7.0",
"eslint": "0.24"
},

@@ -30,6 +32,6 @@ "scripts" : {

"eslintConfig" : {
"env" : {
"env" : {
"node": true
},
"rules" : {
"rules": {
"strict" : 0,

@@ -36,0 +38,0 @@ "new-cap" : 0,

@@ -1,2 +0,53 @@

# react-teleport
react-teleport
==============
[![Build Status](https://travis-ci.org/coma/react-teleport.png?branch=master)](https://travis-ci.org/coma/react-teleport)
[![Dependency Status](https://david-dm.org/coma/react-teleport.png)](http://david-dm.org/coma/react-teleport)
[![NPM version](https://badge.fury.io/js/react-teleport.png)](http://badge.fury.io/js/react-teleport)
A neat way of handling views on other components
Usage
-----
Just mount a destination on one of your components:
```javascript
var React = require('react'),
Destination = require('react-teleport').Destination;
module.exports = module.exports = React.createClass({
render: function () {
return (
<div>
<Destination name="header"/>
</div>
);
}
});
```
and then send an element from another:
```javascript
var React = require('react'),
Portal = require('react-teleport').Portal;
module.exports = module.exports = React.createClass({
render: function () {
return (
<div>
<Portal destination="header">
<nav>
<a href="#">some</a>
<a href="#">breadcrumbs</a>
<a href="#">on the header!</a>
</nav>
</Portal>
</div>
);
}
});
```
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