18 lines
237 B
React
18 lines
237 B
React
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
|
||
|
//destructure props
|
||
|
const Hello = ({msg}) => {
|
||
|
return (
|
||
|
<>
|
||
|
<div>{msg}</div>
|
||
|
</>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default Hello
|
||
|
|
||
|
Hello.propTypes = {
|
||
|
msg: PropTypes.string,
|
||
|
};
|