dangerously-set-inner-html

dangerouslySetInnerHTML that evaluates script tags

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
dangerously-set-inner-html
1242.0.15 years ago6 years agoMinified + gzip package size for dangerously-set-inner-html in KB

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