Skip to content

Instantly share code, notes, and snippets.

@jaredly
Created February 2, 2015 16:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jaredly/593c9b22c619aaf0e0cf to your computer and use it in GitHub Desktop.
Save jaredly/593c9b22c619aaf0e0cf to your computer and use it in GitHub Desktop.
Demonstrate react devtools from inner frame
<script>
__REACT_DEVTOOLS_GLOBAL_HOOK__ = parent.__REACT_DEVTOOLS_GLOBAL_HOOK__
</script>
<script src="vendor.js"></script>
<script>
window.React = parent.React = require('react')
window.onload = function() {
React.render(React.createElement('strong', null, 'hello'), document.body)
}
</script>
<iframe src="inner.html"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment