Last active
March 18, 2018 07:43
-
-
Save AnkurVyas-BTC/f45ffd1027a9bc280378ff7eae7d653d to your computer and use it in GitHub Desktop.
Content of Greet User component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Path : app/javascript/components/GreetUser.js | |
| import React from "react"; | |
| import PropTypes from "prop-types"; | |
| class GreetUser extends React.Component { | |
| render () { | |
| return ( | |
| <div> | |
| <h1>Hello {this.props.name}, </h1> | |
| <h3>Wow! This is your first react component!</h3> | |
| </div> | |
| ); | |
| } | |
| } | |
| GreetUser.propTypes = { | |
| name: PropTypes.string | |
| }; | |
| export default GreetUser; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment