Sha256: e1e38c13bc6b7a0909d1f82f875e5feb36b5bf7408b9e6f5a6744bb7f2fec61a
Contents?: true
Size: 541 Bytes
Versions: 73
Compression:
Stored size: 541 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: </label> <input id="name" type="text" value={name} onChange={(e) => updateName(e.target.value)} /> </form> </div> ); HelloWorld.propTypes = { name: PropTypes.string.isRequired, updateName: PropTypes.func.isRequired, }; export default HelloWorld;
Version data entries
73 entries across 73 versions & 1 rubygems