index.js
function Markdown(props) {
  const tagProps = Object.keys(props).filter(filter).reduce(reducer.bind(null, props), {});

  const parser = createParser(props.parser);

  return React.createElement(
    props.tagName,
    Object.assign(tagProps, {
      dangerouslySetInnerHTML: {
        __html: parser(props.content),
      },
    }),
  );
}
function Markdown(props) {
  const tagProps = Object.keys(props).filter(filter).reduce(reducer.bind(null, props), {});

  const parser = createParser(props.parser);

  return React.createElement(
    props.tagName,
    Object.assign(tagProps, {
      dangerouslySetInnerHTML: {
        __html: parser(props.content),
      },
    }),
  );
}
function Markdown ( props ) { const tagProps = Object . keys ( props ) . filter ( filter ) . reduce ( reducer . bind ( null , props ) , { } ) ; const parser = createParser ( props . parser ) ; return React . createElement ( props . tagName , Object . assign ( tagProps , { dangerouslySetInnerHTML : { __html : parser ( props . content ) , } , } ) , ) ; }
Render Platzi Flavored Markdown inside a React application.
@param {string} [props.tagName='div'] The HTML tag used as wrapper
@param {string} props.content         The Markdown content to parse and render
@param {Object} [props.parser={}]     The parser options
Render Platzi Flavored Markdown inside a React application .