const { isValidElement } = require('react');
const { renderToStaticMarkup } = require('react-dom/server');
const data = require('./data');

/**
 * Renders a React element to static HTML markup.
 *
 * @param  {ReactElement} reactElement - The React element.
 * @return {String}                    - The static HTML markup.
 */
const render = reactElement => {
  if (!isValidElement(reactElement)) {
    throw new Error(reactElement, 'is not a valid React element.');
  }
  return renderToStaticMarkup(reactElement);
};

module.exports = {
  render,
  data
};

@@ -1,49 +1,4 @@
-const %7B isValidElement %7D = require('react');%0A
 cons
@@ -55,22 +55,32 @@
 rver');%0A
-const 
+%0Amodule.exports.
 data = r
@@ -288,236 +288,80 @@
  */%0A
-const render = reactElement =%3E %7B%0A  if (!isValidElement(reactElement)) %7B%0A    throw new Error(reactElement, 'is not a valid React element.');%0A  %7D%0A  return renderToStaticMarkup(reactElement);%0A%7D;%0A%0Amodule.exports = %7B%0A  render,%0A  data%0A%7D
+module.exports.render = reactElement =%3E renderToStaticMarkup(reactElement)
 ;%0A

refactor `render` method