UNPKG

react-markdown-loader

Version:

Webpack loader to render React Components from markdown

22 lines (18 loc) 413 B
import React from 'react'; import PropTypes from 'prop-types'; /** * Says hello to who * By default who is World * @param {Object} props React props * @returns {JSX} template */ export default function HelloWorld({ who }) { return ( <div className="hello-world"> Hello {who} </div> ); } HelloWorld.propTypes = { who: PropTypes.string }; HelloWorld.defaultProps = { who: 'World' };