2.0.4 • Published 6 years ago

script-inner-html v2.0.4

Weekly downloads
18
License
MIT
Repository
github
Last release
6 years ago

script-inner-html

dangerouslySetInnerHTML that evaluates <script> tags, improve dangerously-set-inner-html, add <script src=""> support

install

npm install --save script-inner-html

usage

const React = require('react');
const InnerHTML = require('script-inner-html')

const html = `
  <div id="root"></div>
  <script>
    window.alert('hello from script-inner-html');
  </script>
`

module.exports = () => {
  return (
    <InnerHTML html={html} />
  );
};

license

MIT