Sha256: 05865a1160750f6a6ae1358c340d2c3b58e75b6dafe2a6f9cf143ca7350dd1f5
Contents?: true
Size: 510 Bytes
Versions: 17
Compression:
Stored size: 510 Bytes
Contents
import PropTypes from 'prop-types'; import React from 'react'; const HelloWorld = ({ name, updateName }) => ( <div> <h3> Hello, {name}! </h3> <hr /> <form> <label htmlFor="name"> Say hello to: <input id="name" type="text" value={name} onChange={(e) => updateName(e.target.value)} /> </label> </form> </div> ); HelloWorld.propTypes = { name: PropTypes.string.isRequired, updateName: PropTypes.func.isRequired, }; export default HelloWorld;
Version data entries
17 entries across 17 versions & 1 rubygems