DomHelper.js

import React from 'react';

export default function decodeHtml(rawHTML, tagName) {
  return React.createElement(tagName || 'span', {
    dangerouslySetInnerHTML: { __html: rawHTML }
  });
}