Using React to implement xtags
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Using x-tags from Mozilla, we can write custom tags within the DOM and have them being rendered in React.

Read this blog article for more information.

<script src=""></script>
<script src=""></script>
<script src=""></script>

<!-- x-react is the bridge between x-tags and React -->
<script src=""></script>

<script type="text/jsx">
/** @jsx React.DOM */
var Hello = React.createClass({
  render: function() {
    return <div>{'Hello ' +}</div>;

xreact.register('x-hello', Hello);

<x-hello name="World"></x-hello>

The rendered DOM tree lives in the shadow DOM. This lets us manipulate both the <x-hello> component as well as the rendered <div> using Web Inspector.


Anytime you modify the <x-hello> component, whether it is in the inspector or in Javascript with the regular DOM API, React is going to be invoked to update the rendered version.