title: How to render HTML string to component in React JS
body: <p>I have a HTML content as string for eg <code>&lt;div&gt;Hello&lt;/div&gt;</code> and I just want to render it as HTML in react component without using innerHTML method and default react like dangerouslySetInnerHTML. Let me know if there is any perfect alternative which will work effectively. I just do not want to use any package like html-to-react. Is it possible to achieve it with any other default method in React Render?</p>
  
  <pre><code>export default class sampleHTML extends React.Component {
  
      constructor(props) {
          super(props);
          this.state = {
              currentState: "",
  
          };
      }
      componentDidMount() {
          this.setState({currentState :`&lt;div&gt;Hello&lt;/div&gt;` }); 
      }
      render() {
          return (
              &lt;div id="container"&gt;{this.state.currentState}&lt;/div&gt;
          )
      };
  };
  </code></pre>
  
  <p><a href="https://codesandbox.io/s/musing-maxwell-cfizf" rel="nofollow noreferrer">Sample Link</a></p>
  
  <p>I need to render tags not as string</p>