dangerously-set-inner-html
v2.0.1
Published
dangerouslySetInnerHTML that evaluates script tags
Downloads
2,726
Maintainers
Readme
dangerously-set-inner-html
dangerouslySetInnerHTML
that evaluates <script>
tags
install
npm install --save dangerously-set-inner-html
usage
const React = require('react');
const InnerHTML = require('dangerously-set-inner-html')
const html = `
<div id="root"></div>
<script>
window.alert('hello from dangerously-set-inner-html');
</script>
`
module.exports = () => {
return (
<InnerHTML html={html) />
);
};
license
MIT