Napoleonic Political Magnificence
    Wondering what’s next for npm?Check out our public roadmap! »

    dangerously-set-inner-html

    2.0.1 • Public • Published

    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

    Install

    npm i dangerously-set-inner-html

    DownloadsWeekly Downloads

    1,323

    Version

    2.0.1

    License

    none

    Last publish

    Collaborators

    • avatar