rt

react-teleport

A neat way of handling views on other components

Showing:

Popularity

Downloads/wk

1

GitHub Stars

6

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

3.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial