React render to polymer components!

1 min read Original article ↗
<!doctype html>
<html>
<head>
<!-- Web Component Polyfill for old browsers -->
<script src="https://www.polymer-project.org/platform.js"></script>
<!-- Release candidate of next React -->
<script src="http://fb.me/react-with-addons-0.12.0-rc1.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.0-rc1.js"></script>
<!-- Import a web component -->
<link rel="import" href="https://www.polymer-project.org/components/core-icons/core-icons.html">
</head>
<body>
<!-- Web component in its natural habitat -->
<core-icon src="//www.polymer-project.org/images/icons/android.svg"></core-icon>
<!-- React renders to Web Components!!! -->
<div id="react-root"></div>
<script type="text/jsx">
var coreIcon = React.createElement('core-icon', {src: '//www.polymer-project.org/images/icons/android.svg'});
React.render(coreIcon, document.getElementById('react-root'))
</script>
</body>
</html>