code: function generateHtml(node) {
      if (isReactElement(node)) {
          return _react2.default.renderToString(node);
      } else if (isReactFragment(node)) {
          var htmlStr = '';
  
          node.map(function (child) {
              htmlStr += generateHtml(child);
          });
  
          return htmlStr;
      } else if (isReactText(node)) {
          return String(node);
      } else if (isReactEmpty(node)) {
          return '';
      }
  
      try {
          return JSON.stringify(node);
      } catch (err) {
          console.error('stringify error:', err.message);
          return node;
      }
  }
docs: Extends ReactDOMServer.renderToString() to render any sort of
  ReactNode (not just ReactElements) or fall back to JSON.stringify()
  @param  {Object|Array|String} node - a ReactNode
  @return {String}