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

A neat way of handling views on other components


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

react-teleport

Build Status Dependency Status NPM version

A neat way of handling views on other components

Usage

Just mount a destination on one of your components:

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:

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

Keywords

FAQs

Package last updated on 17 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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