Skip to content

3axap4eHko/react-shadow-dom

Repository files navigation

React Shadow DOM

React Shadow DOM is a tiny JavaScript library to use ReactJS in HTML markup through Shadow DOM.

Install

$ npm install react-shadow-dom

Usage

in JavaScript

'use strict';

React.createShadowClass('react-component',{
    render() {
        return (<img src={this.props.src} />);
    }
});

in HTML

<react-component src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4621/javascript.png"></react-component>

<script type="text/javascript" src="js/react.min.js"></script>
<script type="text/javascript" src="js/react-dom.min.js"></script>
<script type="text/javascript" src="js/react-shadow-dom.min.js"></script>
<script type="text/javascript" src="js/browser.min.js"></script>

License

The MIT License Copyright (c) 2015 Ivan Zakharchenko

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published